(action: () => void)
| 6 | * Expect the `logger.error` method to be called when exec action |
| 7 | */ |
| 8 | export function expectLoggerErrorToBeCalled(action: () => void) { |
| 9 | const originalLog = logger.error; |
| 10 | logger.error = jest.fn(); |
| 11 | |
| 12 | action(); |
| 13 | expect(logger.error).toBeCalled(); |
| 14 | |
| 15 | logger.error = originalLog; |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * Expect the `testFn` function to be called when exec action |
no outgoing calls
no test coverage detected