mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Introduce scoped logging (#11127)
This commit is contained in:
@@ -4,6 +4,8 @@ import type { Class } from 'n8n-core';
|
||||
import type { DeepPartial } from 'ts-essentials';
|
||||
import { Container } from 'typedi';
|
||||
|
||||
import type { Logger } from '@/logging/logger.service';
|
||||
|
||||
export const mockInstance = <T>(
|
||||
serviceClass: Class<T>,
|
||||
data: DeepPartial<T> | undefined = undefined,
|
||||
@@ -22,3 +24,6 @@ export const mockEntityManager = (entityClass: Class) => {
|
||||
Object.assign(entityManager, { connection: dataSource });
|
||||
return entityManager;
|
||||
};
|
||||
|
||||
export const mockLogger = () =>
|
||||
mock<Logger>({ withScope: jest.fn().mockReturnValue(mock<Logger>()) });
|
||||
|
||||
Reference in New Issue
Block a user