mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
refactor(core): Use an IoC container to manage singleton classes [Part-2] (no-changelog) (#5690)
* use typedi for UserManagementMailer * use typedi for SamlService * fix typos * use typedi for Queue * use typedi for License * convert some more code to use typedi
This commit is contained in:
committed by
GitHub
parent
c07f838ce6
commit
9bd7529193
@@ -27,6 +27,8 @@ import { Container } from 'typedi';
|
||||
import { LoadNodesAndCredentials } from '@/LoadNodesAndCredentials';
|
||||
import { mockInstance } from '../integration/shared/utils';
|
||||
import { Push } from '@/push';
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import { NodeTypes } from '@/NodeTypes';
|
||||
|
||||
/**
|
||||
* TODO:
|
||||
@@ -157,12 +159,17 @@ describe('ActiveWorkflowRunner', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
externalHooks = mock();
|
||||
activeWorkflowRunner = new ActiveWorkflowRunner(externalHooks);
|
||||
activeWorkflowRunner = new ActiveWorkflowRunner(
|
||||
new ActiveExecutions(),
|
||||
externalHooks,
|
||||
Container.get(NodeTypes),
|
||||
);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await activeWorkflowRunner.removeAll();
|
||||
databaseActiveWorkflowsCount = 0;
|
||||
databaseActiveWorkflowsList = [];
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user