Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
fisker committed Nov 9, 2023
1 parent 7230975 commit 5bb500c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,11 @@ test('has error frame properties', t => {
t.is(stripAnsi(error.codeFrame), EXPECTED_CODE_FRAME);
}
});

test('allow error location out of bounds', t => {
t.throws(() => {
parseJson('{');
}, {
instanceOf: JSONError,
});
});

0 comments on commit 5bb500c

Please sign in to comment.