refactor(core): Refactor cli command tests (no-changelog) (#9731)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-18 10:50:39 +02:00
committed by GitHub
parent fb73ec3994
commit 2d02c73fbd
9 changed files with 160 additions and 250 deletions

View File

@@ -14,7 +14,7 @@ import * as WorkflowExecuteAdditionalData from '@/WorkflowExecuteAdditionalData'
import config from '@/config';
import type { Job, JobId, JobResponse, WebhookResponse } from '@/Queue';
import { Queue } from '@/Queue';
import { N8N_VERSION } from '@/constants';
import { N8N_VERSION, inTest } from '@/constants';
import { ExecutionRepository } from '@db/repositories/execution.repository';
import { WorkflowRepository } from '@db/repositories/workflow.repository';
import type { ICredentialsOverwrite } from '@/Interfaces';
@@ -498,7 +498,7 @@ export class Worker extends BaseCommand {
}
// Make sure that the process does not close
await new Promise(() => {});
if (!inTest) await new Promise(() => {});
}
async catch(error: Error) {