File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed
Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -11,26 +11,38 @@ test('debug should call console.debug', () => {
1111 logger . debug ( 'test message' ) ;
1212
1313 expect ( _console . debug ) . toHaveBeenCalledTimes ( 1 ) ;
14- expect ( _console . debug ) . toHaveBeenCalledWith ( expect . any ( String ) ) ;
14+ expect ( jest . mocked ( _console . debug ) . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot ( `
15+ " ● test message
16+ "
17+ ` ) ;
1518} ) ;
1619
1720test ( 'should call console.info' , ( ) => {
1821 logger . info ( 'info message' ) ;
1922
2023 expect ( _console . info ) . toHaveBeenCalledTimes ( 1 ) ;
21- expect ( _console . info ) . toHaveBeenCalledWith ( expect . any ( String ) ) ;
24+ expect ( jest . mocked ( _console . info ) . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot ( `
25+ " ● info message
26+ "
27+ ` ) ;
2228} ) ;
2329
2430test ( 'should call console.warn' , ( ) => {
2531 logger . warn ( 'warning message' ) ;
2632
2733 expect ( _console . warn ) . toHaveBeenCalledTimes ( 1 ) ;
28- expect ( _console . warn ) . toHaveBeenCalledWith ( expect . any ( String ) ) ;
34+ expect ( jest . mocked ( _console . warn ) . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot ( `
35+ " ▲ warning message
36+ "
37+ ` ) ;
2938} ) ;
3039
3140test ( 'should call console.error' , ( ) => {
3241 logger . error ( 'error message' ) ;
3342
3443 expect ( _console . error ) . toHaveBeenCalledTimes ( 1 ) ;
35- expect ( _console . error ) . toHaveBeenCalledWith ( expect . any ( String ) ) ;
44+ expect ( jest . mocked ( _console . error ) . mock . calls [ 0 ] [ 0 ] ) . toMatchInlineSnapshot ( `
45+ " ■ error message
46+ "
47+ ` ) ;
3648} ) ;
You can’t perform that action at this time.
0 commit comments