mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
5e00a013eb
ESLint 4.19.1 fixes some bugs in rules. These changes prepare us for the upgrade. PR-URL: https://github.com/nodejs/node/pull/19528 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
12 lines
410 B
JavaScript
12 lines
410 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
// Nul bytes should throw, not abort.
|
|
/* eslint-disable no-control-regex */
|
|
assert.throws(() => require('\u0000ab'), /Cannot find module '\u0000ab'/);
|
|
assert.throws(() => require('a\u0000b'), /Cannot find module 'a\u0000b'/);
|
|
assert.throws(() => require('ab\u0000'), /Cannot find module 'ab\u0000'/);
|
|
/* eslint-enable no-control-regex */
|