mirror of https://github.com/lukechilds/node.git
Browse Source
PR-URL: https://github.com/nodejs/node/pull/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>v6.x
Sarah Meyer
8 years ago
committed by
Anna Henningsen
1 changed files with 5 additions and 5 deletions
@ -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'); |
|||
} |
|||
|
Loading…
Reference in new issue