2024-04-16 01:39:06 +02:00
|
|
|
import { ILoggerRepository } from 'src/interfaces/logger.interface';
|
2024-04-16 16:44:45 +02:00
|
|
|
import { Mocked, vitest } from 'vitest';
|
2024-04-16 01:39:06 +02:00
|
|
|
|
2024-04-16 16:44:45 +02:00
|
|
|
export const newLoggerRepositoryMock = (): Mocked<ILoggerRepository> => {
|
2024-04-16 01:39:06 +02:00
|
|
|
return {
|
2024-04-16 16:44:45 +02:00
|
|
|
setLogLevel: vitest.fn(),
|
|
|
|
setContext: vitest.fn(),
|
2024-05-14 16:28:20 +02:00
|
|
|
setAppName: vitest.fn(),
|
2024-09-28 00:10:39 +02:00
|
|
|
isLevelEnabled: vitest.fn(),
|
2024-04-16 16:44:45 +02:00
|
|
|
verbose: vitest.fn(),
|
|
|
|
debug: vitest.fn(),
|
|
|
|
log: vitest.fn(),
|
|
|
|
warn: vitest.fn(),
|
|
|
|
error: vitest.fn(),
|
|
|
|
fatal: vitest.fn(),
|
2024-04-16 01:39:06 +02:00
|
|
|
};
|
|
|
|
};
|