@@ -12,18 +12,21 @@ describe('shared/logger.ts', () => {
1212 describe ( 'logInfo' , ( ) => {
1313 it ( 'logs info without contexts' , ( ) => {
1414 logInfo ( 'foo' , 'bar' ) ;
15+
1516 expect ( logInfoSpy ) . toHaveBeenCalledTimes ( 1 ) ;
1617 expect ( logInfoSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' ) ;
1718 } ) ;
1819
1920 it ( 'logs info with single context' , ( ) => {
2021 logInfo ( 'foo' , 'bar' , [ 'ctx' ] ) ;
22+
2123 expect ( logInfoSpy ) . toHaveBeenCalledTimes ( 1 ) ;
2224 expect ( logInfoSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' , '[ctx]' ) ;
2325 } ) ;
2426
2527 it ( 'logs info with multiple contexts' , ( ) => {
2628 logInfo ( 'foo' , 'bar' , [ 'ctx1' , 'ctx2' ] ) ;
29+
2730 expect ( logInfoSpy ) . toHaveBeenCalledTimes ( 1 ) ;
2831 expect ( logInfoSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' , '[ctx1 >> ctx2]' ) ;
2932 } ) ;
@@ -32,18 +35,21 @@ describe('shared/logger.ts', () => {
3235 describe ( 'logWarn' , ( ) => {
3336 it ( 'logs warn without contexts' , ( ) => {
3437 logWarn ( 'foo' , 'bar' ) ;
38+
3539 expect ( logWarnSpy ) . toHaveBeenCalledTimes ( 1 ) ;
3640 expect ( logWarnSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' ) ;
3741 } ) ;
3842
3943 it ( 'logs warn with single context' , ( ) => {
4044 logWarn ( 'foo' , 'bar' , [ 'ctx' ] ) ;
45+
4146 expect ( logWarnSpy ) . toHaveBeenCalledTimes ( 1 ) ;
4247 expect ( logWarnSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' , '[ctx]' ) ;
4348 } ) ;
4449
4550 it ( 'logs warn with multiple contexts' , ( ) => {
4651 logWarn ( 'foo' , 'bar' , [ 'ctx1' , 'ctx2' ] ) ;
52+
4753 expect ( logWarnSpy ) . toHaveBeenCalledTimes ( 1 ) ;
4854 expect ( logWarnSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' , '[ctx1 >> ctx2]' ) ;
4955 } ) ;
@@ -52,12 +58,14 @@ describe('shared/logger.ts', () => {
5258 describe ( 'logError' , ( ) => {
5359 it ( 'logs error without contexts' , ( ) => {
5460 logError ( 'foo' , 'bar' , mockError ) ;
61+
5562 expect ( logErrorSpy ) . toHaveBeenCalledTimes ( 1 ) ;
5663 expect ( logErrorSpy ) . toHaveBeenCalledWith ( '[foo]' , 'bar' , mockError ) ;
5764 } ) ;
5865
5966 it ( 'logs error with single context' , ( ) => {
6067 logError ( 'foo' , 'bar' , mockError , [ 'ctx' ] ) ;
68+
6169 expect ( logErrorSpy ) . toHaveBeenCalledTimes ( 1 ) ;
6270 expect ( logErrorSpy ) . toHaveBeenCalledWith (
6371 '[foo]' ,
@@ -69,6 +77,7 @@ describe('shared/logger.ts', () => {
6977
7078 it ( 'logs error with multiple contexts' , ( ) => {
7179 logError ( 'foo' , 'bar' , mockError , [ 'ctx1' , 'ctx2' ] ) ;
80+
7281 expect ( logErrorSpy ) . toHaveBeenCalledTimes ( 1 ) ;
7382 expect ( logErrorSpy ) . toHaveBeenCalledWith (
7483 '[foo]' ,
0 commit comments