MCPcopy
hub / github.com/node-cron/node-cron / fakeLogger

Function fakeLogger

src/logger.test.ts:129–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 afterEach(() => resetLogger());
128
129 function fakeLogger(): Logger & { calls: Record<string, any[][]> } {
130 const calls: Record<string, any[][]> = { info: [], warn: [], error: [], debug: [] };
131 return {
132 calls,
133 info: (...a: any[]) => { calls.info.push(a); },
134 warn: (...a: any[]) => { calls.warn.push(a); },
135 error: (...a: any[]) => { calls.error.push(a); },
136 debug: (...a: any[]) => { calls.debug.push(a); },
137 };
138 }
139
140 it('routes all calls to a custom logger and not to the console', () => {
141 const custom = fakeLogger();

Callers 1

logger.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected