Skip to content

Commit

Permalink
fix assertValidParse: fail if there are errors
Browse files Browse the repository at this point in the history
Previously, it only failed the test if an error's code was "undefined".
  • Loading branch information
sqs committed Mar 3, 2018
1 parent a8eef40 commit 087e60a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/test/json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ function assertValidParse(input: string, expected: any, options?: ParseOptions):
var errors: ParseError[] = [];
var actual = parse(input, errors, options);

if (errors.length !== 0) {
assert.notEqual("undefined", typeof errors[0].error);
}
assert.deepEqual([], errors)
assert.deepEqual(actual, expected);
}

Expand Down

0 comments on commit 087e60a

Please sign in to comment.