Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
mockPinoTrace = jest.fn();
mockPinoDebug = jest.fn();
mockPinoInfo = jest.fn();
mockPinoWarn = jest.fn();
mockPinoError = jest.fn();
mockPinoFatal = jest.fn();
mockPinoInstance = {};
mockPinoInstance.trace = mockPinoTrace;
mockPinoInstance.debug = mockPinoDebug;
mockPinoInstance.info = mockPinoInfo;
mockPinoInstance.warn = mockPinoWarn;
mockPinoInstance.error = mockPinoError;
mockPinoInstance.fatal = mockPinoFatal;
pino.mockReturnValue(mockPinoInstance);
});