refactor(core): Overhaul commands setup. Add support for module commands (#16709)

Co-authored-by: Iván Ovejero <ivov.src@gmail.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-07-01 19:14:22 +02:00
committed by GitHub
parent 346bc84093
commit 9f8d3d3bc8
41 changed files with 1061 additions and 541 deletions

View File

@@ -5,7 +5,6 @@ import { WorkflowRepository } from '@n8n/db';
import { DbConnection } from '@n8n/db';
import { Container } from '@n8n/di';
import type { SelectQueryBuilder } from '@n8n/typeorm';
import type { Config } from '@oclif/core';
import { mock } from 'jest-mock-extended';
import type { IRun } from 'n8n-workflow';
@@ -75,9 +74,9 @@ test('should start a task runner when task runners are enabled', async () => {
}),
);
const cmd = new ExecuteBatch([], {} as Config);
// @ts-expect-error Private property
cmd.parse = jest.fn().mockResolvedValue({ flags: {} });
const cmd = new ExecuteBatch();
// @ts-expect-error Protected property
cmd.flags = {};
// @ts-expect-error Private property
cmd.runTests = jest.fn().mockResolvedValue({ summary: { failedExecutions: [] } });