Skip to content

Commit

Permalink
test(Logger): apart from asserting a throw, also assert the thrown er…
Browse files Browse the repository at this point in the history
…ror message
  • Loading branch information
lamweili committed Oct 1, 2022
1 parent 6f697ad commit 6a8b706
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/tap/logger-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,10 @@ test('../../lib/logger', (batch) => {
t.equal(events[0].fileName, initialEvent.fileName);
t.equal(events[0].columnNumber, initialEvent.columnNumber);

t.throws(() => logger.setParseCallStackFunction('not a function'));
t.throws(
() => logger.setParseCallStackFunction('not a function'),
'Invalid type passed to setParseCallStackFunction'
);

t.end();
});
Expand Down

0 comments on commit 6a8b706

Please sign in to comment.