Browse Source

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>
v6
Christy Leung 8 years ago
committed by Rich Trott
parent
commit
c00f647963
  1. 8
      test/parallel/test-internal-modules.js

8
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')),

Loading…
Cancel
Save