Browse Source

Fix test-require-json on Windows

v0.8.7-release
isaacs 13 years ago
parent
commit
c4e9226bdb
  1. 5
      test/simple/test-require-json.js

5
test/simple/test-require-json.js

@ -24,6 +24,7 @@ var assert = require('assert');
try { try {
require('../fixtures/invalid.json'); require('../fixtures/invalid.json');
} catch (err) { } catch (err) {
var i = err.message.indexOf('test/fixtures/invalid.json: Unexpected string') var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
assert(-1 != i, 'require() json error should include path'); var i = err.message.match(re);
assert(null !== i, 'require() json error should include path');
} }
Loading…
Cancel
Save