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');
-}
\ No newline at end of file
+ var re = /test[\/\\]fixtures[\/\\]invalid.json: Unexpected string/;
+ var i = err.message.match(re);
+ assert(null !== i, 'require() json error should include path');
+}