mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Fix test-require-json on Windows
This commit is contained in:
1 parent
1c1ad9bcf4
commit
c4e9226bdb
1 file changed
+4
-3
@@ -24,6 +24,7 @@ var assert = require('assert');
|
||||
try {
|
||||
require('../fixtures/invalid.json');
|
||||
} catch (err) {
|
||||
var i = err.message.indexOf('test/fixtures/invalid.json: Unexpected string')
|
||||
assert(-1 != i, 'require() json error should include path');
|
||||
}
|
||||
var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
|
||||
var i = err.message.match(re);
|
||||
assert(null !== i, 'require() json error should include path');
|
||||
}
|
||||
Reference in new issue
Block a user