Skip to content

Commit

Permalink
test: refactor test-internal-modules
Browse files Browse the repository at this point in the history
* var -> const
* add RegExp to assert.throws() to check error message

PR-URL: #10016
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
christysunnydays authored and evanlucas committed Jan 4, 2017
1 parent 2ad9faa commit 9349f08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-internal-modules.js
Original file line number Diff line number Diff line change
@@ -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')),
Expand Down

0 comments on commit 9349f08

Please sign in to comment.