Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix test-require-json on Windows

  • Loading branch information...
commit c4e9226bdb5ce00fbe8a8b2dcb4ac4ebfe5de119 1 parent 1c1ad9b
@isaacs isaacs authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 test/simple/test-require-json.js
View
7 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');
+}
Please sign in to comment.
Something went wrong with that request. Please try again.