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 MylesBorins committed Dec 21, 2016
1 parent e2bf2c0 commit dc06e7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/parallel/test-require-json.js
@@ -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 dc06e7a

Please sign in to comment.