Skip to content

Commit 9349f08

Browse files
christysunnydaysevanlucas
authored andcommitted
test: refactor test-internal-modules
* var -> const * add RegExp to assert.throws() to check error message PR-URL: #10016 Reviewed-By: James M Snell <[email protected]>
1 parent 2ad9faa commit 9349f08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-internal-modules.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
2-
var common = require('../common');
3-
var path = require('path');
4-
var assert = require('assert');
2+
const common = require('../common');
3+
const path = require('path');
4+
const assert = require('assert');
55

66
assert.throws(function() {
77
require('internal/freelist');
8-
});
8+
}, /^Error: Cannot find module 'internal\/freelist'$/);
99

1010
assert.strictEqual(
1111
require(path.join(common.fixturesDir, 'internal-modules')),

0 commit comments

Comments
 (0)