summaryrefslogtreecommitdiff
path: root/test/parallel/test-internal-modules.js
diff options
context:
space:
mode:
authorChristy Leung <christy.leung@help.com>2016-12-01 11:03:32 -0600
committerRich Trott <rtrott@gmail.com>2016-12-23 22:48:48 -0800
commitc00f64796318f1b714e856db96a1b64b2956a890 (patch)
treeebe7fff3cc0654bf02118b5ea2c810e685718cba /test/parallel/test-internal-modules.js
parent1fddf5b6d6aa59c34822e60f7ec0d84b8793e16a (diff)
downloadandroid-node-v8-c00f64796318f1b714e856db96a1b64b2956a890.tar.gz
android-node-v8-c00f64796318f1b714e856db96a1b64b2956a890.tar.bz2
android-node-v8-c00f64796318f1b714e856db96a1b64b2956a890.zip
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>
Diffstat (limited to 'test/parallel/test-internal-modules.js')
-rw-r--r--test/parallel/test-internal-modules.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/parallel/test-internal-modules.js b/test/parallel/test-internal-modules.js
index ea300d5c5f..2f11ca18dd 100644
--- a/test/parallel/test-internal-modules.js
+++ b/test/parallel/test-internal-modules.js
@@ -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')),