(methods?: ('log' | 'warn' | 'error')[])
| 1 | export const mockConsole = (methods?: ('log' | 'warn' | 'error')[]) => { |
| 2 | if (methods) { |
| 3 | return methods.forEach((m) => jest.spyOn(console, m).mockImplementation()); |
| 4 | } |
| 5 | |
| 6 | jest.spyOn(console, 'log').mockImplementation(); |
| 7 | jest.spyOn(console, 'warn').mockImplementation(); |
| 8 | jest.spyOn(console, 'error').mockImplementation(); |
| 9 | }; |
no test coverage detected