test: type cli test mocks

This commit is contained in:
Shakker
2026-06-15 19:34:16 +01:00
parent c40db057da
commit 5c2487dc9a
5 changed files with 31 additions and 6 deletions

View File

@@ -10,7 +10,14 @@ const DISCORD_REPO_INSTALL_SPEC = repoInstallSpec("discord");
const setVerboseMock = vi.fn();
const emitCliBannerMock = vi.fn();
const ensureConfigReadyMock = vi.fn(async () => {});
type EnsureConfigReadyOptions = {
beforeStateMigrations?: () => Promise<boolean>;
commandPath?: string[];
requireConfig?: boolean;
};
const ensureConfigReadyMock = vi.fn<(_opts: EnsureConfigReadyOptions) => Promise<void>>(
async () => {},
);
const ensurePluginRegistryLoadedMock = vi.fn();
const routeLogsToStderrMock = vi.fn();
const prepareGatewayRunBootstrapMock = vi.fn(async () => true);