Skip to content

Commit c5ef839

Browse files
committed
test(daemon): isolate install identity fixtures
1 parent ce8a1ff commit c5ef839

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎src/cli/daemon-cli.coverage.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ const mocks = await vi.hoisted(async () => {
8787

8888
const { runtimeLogs } = mocks;
8989

90+
vi.mock("../config/paths.js", async () => {
91+
const actual = await vi.importActual<typeof import("../config/paths.js")>("../config/paths.js");
92+
return { ...actual, isDefaultInstallIdentity: () => true };
93+
});
94+
9095
vi.mock("./daemon-cli/probe.js", () => ({
9196
probeGatewayStatus: (opts: unknown) => probeGatewayStatus(opts),
9297
}));

‎src/cli/daemon-cli/install.integration.test.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ const serviceMock = vi.hoisted(() => ({
2222
readRuntime: vi.fn(async () => ({ status: "stopped" as const })),
2323
}));
2424

25+
vi.mock("../../config/paths.js", async () => {
26+
const actual =
27+
await vi.importActual<typeof import("../../config/paths.js")>("../../config/paths.js");
28+
return { ...actual, isDefaultInstallIdentity: () => true };
29+
});
30+
2531
vi.mock("../../daemon/service.js", () => ({
2632
resolveGatewayService: () => serviceMock,
2733
}));

0 commit comments

Comments
 (0)