test(cli): fix option-collision mock typings
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import { Command } from "commander";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const callGatewayCli = vi.fn(async () => ({ ok: true }));
|
||||
const gatewayStatusCommand = vi.fn(async () => {});
|
||||
const callGatewayCli = vi.fn(async (_method: string, _opts: unknown, _params?: unknown) => ({
|
||||
ok: true,
|
||||
}));
|
||||
const gatewayStatusCommand = vi.fn(async (_opts: unknown, _runtime: unknown) => {});
|
||||
|
||||
const runtimeLogs: string[] = [];
|
||||
const runtimeErrors: string[] = [];
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import { Command } from "commander";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
const startGatewayServer = vi.fn(async () => ({
|
||||
const startGatewayServer = vi.fn(async (_port: number, _opts?: unknown) => ({
|
||||
close: vi.fn(async () => {}),
|
||||
}));
|
||||
const setGatewayWsLogStyle = vi.fn();
|
||||
const setVerbose = vi.fn();
|
||||
const forceFreePortAndWait = vi.fn(async () => ({
|
||||
const setGatewayWsLogStyle = vi.fn((_style: string) => undefined);
|
||||
const setVerbose = vi.fn((_enabled: boolean) => undefined);
|
||||
const forceFreePortAndWait = vi.fn(async (_port: number, _opts: unknown) => ({
|
||||
killed: [],
|
||||
waitedMs: 0,
|
||||
escalatedToSigkill: false,
|
||||
}));
|
||||
const ensureDevGatewayConfig = vi.fn(async () => {});
|
||||
const ensureDevGatewayConfig = vi.fn(async (_opts?: unknown) => {});
|
||||
const runGatewayLoop = vi.fn(async ({ start }: { start: () => Promise<unknown> }) => {
|
||||
await start();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user