From 9349f086d9ab9f0736fb4d6482b511869c7e39a1 Mon Sep 17 00:00:00 2001 From: Christy Leung Date: Thu, 1 Dec 2016 11:03:32 -0600 Subject: [PATCH] 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 --- test/parallel/test-internal-modules.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-internal-modules.js b/test/parallel/test-internal-modules.js index ea300d5c5fb85c..2f11ca18dd6b34 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')),