renovate/lib/logger/__mocks__/index.ts
Florian Greinacher 71cf56eaf9
feat(dependency-dashboard): display logged repository problems (#6952)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2020-09-21 22:04:11 +02:00

25 lines
515 B
TypeScript

const loggerLevels: string[] = [
'trace',
'debug',
'info',
'warn',
'error',
'fatal',
'child',
];
const logger: any = {};
loggerLevels.forEach(k => {
logger[k] = jest.fn();
});
export const setContext = jest.fn();
export const getContext = jest.fn();
export const setMeta = jest.fn();
export const addMeta = jest.fn();
export const removeMeta = jest.fn();
export const levels = jest.fn();
export const addStream = jest.fn();
export const getProblems = jest.fn((): any[] => []);
export { logger };