mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Use DI for eventBus code - Part 1 (no-changelog) (#8434)
This commit is contained in:
committed by
GitHub
parent
3cc0f81c02
commit
7c49004018
@@ -1,7 +1,12 @@
|
||||
import type { SuperAgentTest } from 'supertest';
|
||||
import * as utils from './shared/utils/';
|
||||
|
||||
import type { User } from '@db/entities/User';
|
||||
import { MessageEventBus } from '@/eventbus';
|
||||
import { ExecutionDataRecoveryService } from '@/eventbus/executionDataRecovery.service';
|
||||
|
||||
import * as utils from './shared/utils/';
|
||||
import { createUser } from './shared/db/users';
|
||||
import { mockInstance } from '../shared/mocking';
|
||||
|
||||
/**
|
||||
* NOTE: due to issues with mocking the MessageEventBus in multiple tests running in parallel,
|
||||
@@ -12,6 +17,8 @@ import { createUser } from './shared/db/users';
|
||||
let owner: User;
|
||||
let authOwnerAgent: SuperAgentTest;
|
||||
|
||||
mockInstance(MessageEventBus);
|
||||
mockInstance(ExecutionDataRecoveryService);
|
||||
const testServer = utils.setupTestServer({
|
||||
endpointGroups: ['eventBus'],
|
||||
enabledFeatures: [], // do not enable logstreaming
|
||||
|
||||
Reference in New Issue
Block a user