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 <cjihrig@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
sarahmeyer authored and jasnell committed Dec 5, 2016
1 parent ecf7bb7 commit f51c02f
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 f51c02f

Please sign in to comment.