Skip to content

Commit

Permalink
test: use const instead of var in test-require-json.js
Browse files Browse the repository at this point in the history
PR-URL: #9904
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Myles Borins <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
sarahmeyer authored and Fishrock123 committed Dec 5, 2016
1 parent 5f3f54d commit f62567b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-require-json.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
'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');

try {
require(path.join(common.fixturesDir, 'invalid.json'));
} catch (err) {
var re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/;
var i = err.message.match(re);
const re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/;
const i = err.message.match(re);
assert.notStrictEqual(null, i, 'require() json error should include path');
}

0 comments on commit f62567b

Please sign in to comment.