Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Jan 23, 2025
1 parent 73c0bdb commit 7d7dcb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,13 @@ describe('Utils', () => {
const warningSpy = vi.spyOn(console, 'warn');
const errorSpy = vi.spyOn(console, 'error');
logger.debug('debug', 'zh');
expect(debugSpy).toHaveBeenCalledWith('zh: debug');
expect(debugSpy).toHaveBeenCalledWith(expect.stringMatching(/^\[\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ\] zh: debug$/));
logger.info('info', 'zh');
expect(infoSpy).toHaveBeenCalledWith('zh: info');
expect(infoSpy).toHaveBeenCalledWith(expect.stringMatching(/^\[\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ\] zh: info$/));
logger.warning('warning', 'zh');
expect(warningSpy).toHaveBeenCalledWith('zh: warning');
expect(warningSpy).toHaveBeenCalledWith(expect.stringMatching(/^\[\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ\] zh: warning$/));
logger.error('error', 'zh');
expect(errorSpy).toHaveBeenCalledWith('zh: error');
expect(errorSpy).toHaveBeenCalledWith(expect.stringMatching(/^\[\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ\] zh: error$/));

setLogger(mockLogger);
expect(logger).toEqual(mockLogger);
Expand Down

0 comments on commit 7d7dcb9

Please sign in to comment.