mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
f51c02f8a0
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>
13 lines
381 B
JavaScript
13 lines
381 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const path = require('path');
|
|
const assert = require('assert');
|
|
|
|
try {
|
|
require(path.join(common.fixturesDir, 'invalid.json'));
|
|
} catch (err) {
|
|
const re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/;
|
|
const i = err.message.match(re);
|
|
assert.notStrictEqual(null, i, 'require() json error should include path');
|
|
}
|