summaryrefslogtreecommitdiff
path: root/test/parallel/test-require-json.js
blob: 4c17fc8d025d734d992254845cb785ef5bc2c9c9 (plain)
1
2
3
4
5
6
7
8
9
10
'use strict';
var assert = require('assert');

try {
  require('../fixtures/invalid.json');
} catch (err) {
  var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
  var i = err.message.match(re);
  assert(null !== i, 'require() json error should include path');
}