mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix: Remove circular dependencies from cli tests (no-changelog) (#5000)
* fix typescript errors in cli * remove circular dependencies from cli tests
This commit is contained in:
committed by
GitHub
parent
17f13b3b6e
commit
0a416eebea
@@ -1,6 +1,6 @@
|
||||
import config from '@/config';
|
||||
import { InternalHooksManager } from '../../src';
|
||||
import { nodeFetchedData, workflowExecutionCompleted } from '../../src/events/WorkflowStatistics';
|
||||
import { InternalHooksManager } from '@/InternalHooksManager';
|
||||
import { nodeFetchedData, workflowExecutionCompleted } from '@/events/WorkflowStatistics';
|
||||
import { LoggerProxy, WorkflowExecuteMode } from 'n8n-workflow';
|
||||
import { getLogger } from '@/Logger';
|
||||
|
||||
@@ -10,14 +10,14 @@ const mockedFirstProductionWorkflowSuccess = jest.fn((...args) => {});
|
||||
const mockedFirstWorkflowDataLoad = jest.fn((...args) => {});
|
||||
|
||||
jest.spyOn(InternalHooksManager, 'getInstance').mockImplementation((...args) => {
|
||||
const actual = jest.requireActual('../../src/InternalHooks');
|
||||
const actual = jest.requireActual('@/InternalHooks');
|
||||
return {
|
||||
...actual,
|
||||
onFirstProductionWorkflowSuccess: mockedFirstProductionWorkflowSuccess,
|
||||
onFirstWorkflowDataLoad: mockedFirstWorkflowDataLoad,
|
||||
};
|
||||
});
|
||||
jest.mock('../../src/Db', () => {
|
||||
jest.mock('@/Db', () => {
|
||||
return {
|
||||
collections: {
|
||||
Workflow: {
|
||||
@@ -36,7 +36,7 @@ jest.mock('../../src/Db', () => {
|
||||
},
|
||||
};
|
||||
});
|
||||
jest.mock('../../src/UserManagement/UserManagementHelper', () => {
|
||||
jest.mock('@/UserManagement/UserManagementHelper', () => {
|
||||
return {
|
||||
getWorkflowOwner: jest.fn((workflowId) => {
|
||||
return { id: FAKE_USER_ID };
|
||||
|
||||
Reference in New Issue
Block a user