UNPKG

nestjs-request-deduplication

Version:

[![npm version](https://badge.fury.io/js/nestjs-request-deduplication.svg)](https://www.npmjs.com/package/nestjs-request-deduplication) [![CI](https://github.com/daniyel/nestjs-request-deduplication/actions/workflows/pr-checks.yml/badge.svg)](https://gith

10 lines (9 loc) 624 B
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() });