Skip to content

Commit

Permalink
test: set Logger instance should throw error
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 20, 2024
1 parent 492b9e3 commit 60f6961
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,11 @@ describe('index.test.ts', () => {
assert.equal(logs[0], '[😄哈哈] foo \'bar\' 1');
assert.equal(logs[1], 'biz logger here');
});

it('should throw error when set Logger instance', () => {
assert.throws(() => {
setCustomLogger('logger', getLogger());
}, /can\'t set realLogger to Logger instance/);
});
});
});

0 comments on commit 60f6961

Please sign in to comment.