Permalink
Browse files

Fix test-require-json on Windows

  • Loading branch information...
1 parent 1c1ad9b commit c4e9226bdb5ce00fbe8a8b2dcb4ac4ebfe5de119 @isaacs isaacs committed Jul 7, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/simple/test-require-json.js
@@ -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.