Created
February 6, 2023 03:10
-
-
Save AlexPetrov7311/6394e28f43fe243d3a5b719e3a280516 to your computer and use it in GitHub Desktop.
Jest Winston
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // create winstonLoggerInstance here, e.g. in beforeEach().... | |
| const winstonLoggerMock = jest.spyOn(winstonLoggerInstance, 'log'); | |
| serviceInstance.debug('debug sent from test'); | |
| expect(winstonLoggerMock).toHaveBeenCalled(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment