Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

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 a6a2edb commit 197b47c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/simple/test-require-json.js
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 197b47c

Please sign in to comment.