We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f3f54d commit f62567bCopy full SHA for f62567b
test/parallel/test-require-json.js
@@ -1,12 +1,12 @@
1
'use strict';
2
-var common = require('../common');
3
-var path = require('path');
4
-var assert = require('assert');
+const common = require('../common');
+const path = require('path');
+const assert = require('assert');
5
6
try {
7
require(path.join(common.fixturesDir, 'invalid.json'));
8
} catch (err) {
9
- var re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/;
10
- var i = err.message.match(re);
+ const re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/;
+ const i = err.message.match(re);
11
assert.notStrictEqual(null, i, 'require() json error should include path');
12
}
0 commit comments