mirror of
https://github.com/nodejs/node.git
synced 2026-10-14 10:26:26 -04:00
test: refactor test-internal-modules
* var -> const * add RegExp to assert.throws() to check error message PR-URL: https://github.com/nodejs/node/pull/10016 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
1fddf5b6d6
commit
c00f647963
1 file changed
+4
-4
@@ -1,11 +1,11 @@
|
||||
'use strict';
|
||||
var common = require('../common');
|
||||
var path = require('path');
|
||||
var assert = require('assert');
|
||||
const common = require('../common');
|
||||
const path = require('path');
|
||||
const assert = require('assert');
|
||||
|
||||
assert.throws(function() {
|
||||
require('internal/freelist');
|
||||
});
|
||||
}, /^Error: Cannot find module 'internal\/freelist'$/);
|
||||
|
||||
assert.strictEqual(
|
||||
require(path.join(common.fixturesDir, 'internal-modules')),
|
||||
|
||||
Reference in new issue
Block a user