mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Use DI for WorkflowRunner (no-changelog) (#8372)
This commit is contained in:
committed by
GitHub
parent
bf11c7c1bd
commit
c70fa66e76
@@ -21,7 +21,7 @@ describe('WaitTracker', () => {
|
||||
it('should query DB for waiting executions', async () => {
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([execution]);
|
||||
|
||||
new WaitTracker(mock(), executionRepository, mock());
|
||||
new WaitTracker(mock(), executionRepository, mock(), mock());
|
||||
|
||||
expect(executionRepository.getWaitingExecutions).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
@@ -29,7 +29,7 @@ describe('WaitTracker', () => {
|
||||
it('if no executions to start, should do nothing', () => {
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([]);
|
||||
|
||||
new WaitTracker(mock(), executionRepository, mock());
|
||||
new WaitTracker(mock(), executionRepository, mock(), mock());
|
||||
|
||||
expect(executionRepository.findSingleExecution).not.toHaveBeenCalled();
|
||||
});
|
||||
@@ -37,7 +37,7 @@ describe('WaitTracker', () => {
|
||||
describe('if execution to start', () => {
|
||||
it('if not enough time passed, should not start execution', async () => {
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([execution]);
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock());
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock(), mock());
|
||||
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([execution]);
|
||||
await waitTracker.getWaitingExecutions();
|
||||
@@ -51,7 +51,7 @@ describe('WaitTracker', () => {
|
||||
|
||||
it('if enough time passed, should start execution', async () => {
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([]);
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock());
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock(), mock());
|
||||
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([execution]);
|
||||
await waitTracker.getWaitingExecutions();
|
||||
@@ -68,7 +68,7 @@ describe('WaitTracker', () => {
|
||||
describe('startExecution()', () => {
|
||||
it('should query for execution to start', async () => {
|
||||
executionRepository.getWaitingExecutions.mockResolvedValue([]);
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock());
|
||||
const waitTracker = new WaitTracker(mock(), executionRepository, mock(), mock());
|
||||
|
||||
executionRepository.findSingleExecution.mockResolvedValue(execution);
|
||||
waitTracker.startExecution(execution.id);
|
||||
|
||||
Reference in New Issue
Block a user