Skip to content

Commit e482d24

Browse files
committed
test: add a missing test for invalid invocation
1 parent fda6d7a commit e482d24

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/roarr/roarr.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ test('logs an empty message when first parameter is an object and the second par
7070
]);
7171
});
7272

73+
test('throws in case of invalid invocation', (t) => {
74+
const log = createLoggerWithHistory();
75+
76+
t.throws(() => {
77+
// @ts-expect-error Invalid invocation
78+
log({}, {});
79+
}, {
80+
message: 'Message must be a string. Received object.',
81+
});
82+
});
83+
7384
test('formats message using sprintf', (t) => {
7485
const log = createLoggerWithHistory();
7586

0 commit comments

Comments
 (0)