mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Use typedi to manage EventBus singletons (no-changelog) (#5795)
This commit is contained in:
committed by
GitHub
parent
be373bb859
commit
522c790817
@@ -81,6 +81,7 @@ import { setSamlLoginEnabled } from '@/sso/saml/samlHelpers';
|
||||
import { SamlService } from '@/sso/saml/saml.service.ee';
|
||||
import { SamlController } from '@/sso/saml/routes/saml.controller.ee';
|
||||
import { EventBusController } from '@/eventbus/eventBus.controller';
|
||||
import { MessageEventBus } from '@/eventbus';
|
||||
|
||||
export const mockInstance = <T>(
|
||||
ctor: new (...args: any[]) => T,
|
||||
@@ -176,7 +177,8 @@ export async function initTestServer({
|
||||
for (const group of functionEndpoints) {
|
||||
switch (group) {
|
||||
case 'eventBus':
|
||||
registerController(testServer.app, config, new EventBusController());
|
||||
const eventBus = Container.get(MessageEventBus);
|
||||
registerController(testServer.app, config, new EventBusController(eventBus));
|
||||
break;
|
||||
case 'auth':
|
||||
registerController(
|
||||
|
||||
Reference in New Issue
Block a user