Skip to content

Commit

Permalink
Merge pull request #100 from pelias/handle_node_6_errors
Browse files Browse the repository at this point in the history
fix: Use regex to test for correct error
  • Loading branch information
orangejulius authored Jun 13, 2016
2 parents ab1f26d + 1ba8ec2 commit 08bd4a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/components/loadJSONTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ tape('loadJSON', function(test) {

test_stream(input, loadJSON.create('./'), function(err, actual) {
t.deepEqual(actual, expected, 'an empty object should have been returned');
t.equal(stderr, 'exception on this_is_not_json.json: [SyntaxError: Unexpected token h]\n');
t.ok(stderr.match(/SyntaxError: Unexpected token h/), 'error output present');
t.end();
unhook_intercept();
fs.unlinkSync(input[0].path);
Expand Down

0 comments on commit 08bd4a6

Please sign in to comment.