MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / mockLogger

Function mockLogger

tests/helpers.ts:6–12  ·  view source on GitHub ↗
(orm: MikroORM, debug: LoggerNamespace[] = ['query', 'query-params'], mock = vi.fn())

Source from the content-addressed store, hash-verified

4export const TEMP_DIR = process.cwd() + '/temp';
5
6export function mockLogger(orm: MikroORM, debug: LoggerNamespace[] = ['query', 'query-params'], mock = vi.fn()) {
7 const logger = orm.config.getLogger();
8 Object.assign(logger, { writer: mock });
9 orm.config.set('debug', debug);
10
11 return mock;
12}

Calls 3

getLoggerMethod · 0.65
assignMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected