Skip to content

Commit 34c3997

Browse files
committed
test fix root help mock type
1 parent 5c1fdc5 commit 34c3997

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/cli/run-main.exit.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import process from "node:process";
22
import { CommanderError } from "commander";
33
import { beforeEach, describe, expect, it, vi } from "vitest";
44
import { loggingState } from "../logging/state.js";
5+
import type { RootHelpRenderOptions } from "./program/root-help.js";
56
import { runCli, shouldStartProxyForCli } from "./run-main.js";
67

78
const tryRouteCliMock = vi.hoisted(() => vi.fn());
@@ -19,7 +20,7 @@ const outputRootHelpMock = vi.hoisted(() => vi.fn());
1920
const outputPrecomputedRootHelpTextMock = vi.hoisted(() => vi.fn(() => false));
2021
const outputPrecomputedBrowserHelpTextMock = vi.hoisted(() => vi.fn(() => false));
2122
const loadRootHelpRenderOptionsForConfigSensitivePluginsMock = vi.hoisted(() =>
22-
vi.fn(async () => null),
23+
vi.fn<() => Promise<RootHelpRenderOptions | null>>(async () => null),
2324
);
2425
const buildProgramMock = vi.hoisted(() => vi.fn());
2526
const getProgramContextMock = vi.hoisted(() => vi.fn(() => null));
@@ -436,7 +437,7 @@ describe("runCli exit behavior", () => {
436437
});
437438

438439
it("renders config-sensitive root help live instead of precomputed metadata", async () => {
439-
const liveOptions = {
440+
const liveOptions: RootHelpRenderOptions = {
440441
config: {
441442
plugins: {
442443
slots: {

0 commit comments

Comments
 (0)