nestjs-request-deduplication
Version:
[](https://www.npmjs.com/package/nestjs-request-deduplication) [](https://gith
10 lines (9 loc) • 624 B
JavaScript
import { Logger } from '@nestjs/common';
// Replace the logger implementation
jest.spyOn(Logger.prototype, 'log').mockImplementation(() => undefined);
jest.spyOn(Logger.prototype, 'error').mockImplementation(() => undefined);
jest.spyOn(Logger.prototype, 'warn').mockImplementation(() => undefined);
jest.spyOn(Logger.prototype, 'debug').mockImplementation(() => undefined);
jest.spyOn(Logger.prototype, 'verbose').mockImplementation(() => undefined);
// Also mock console methods if needed
global.console = Object.assign(Object.assign({}, console), { log: jest.fn(), error: jest.fn(), warn: jest.fn(), debug: jest.fn() });