Skip to content

Commit

Permalink
Fix test-require-json on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Jul 7, 2012
1 parent 1c1ad9b commit c4e9226
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/simple/test-require-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit c4e9226

Please sign in to comment.