diff --git a/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts b/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts index 6f1067814dc..872a48d3dfc 100644 --- a/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts +++ b/src/commands/doctor.migrates-routing-allowfrom-channels-whatsapp-allowfrom.test.ts @@ -17,6 +17,7 @@ import { import "./doctor.fast-path-mocks.js"; const DOCTOR_MIGRATION_TIMEOUT_MS = 20_000; +const { doctorCommand } = await import("./doctor.js"); describe("doctor command", () => { it("does not add a new gateway auth token while fixing legacy issues on invalid config", async () => { @@ -34,7 +35,6 @@ describe("doctor command", () => { legacyIssues: [{ path: "routing.allowFrom", message: "legacy" }], }); - const { doctorCommand } = await import("./doctor.js"); const runtime = createDoctorRuntime(); migrateLegacyConfig.mockReturnValue({ @@ -78,7 +78,6 @@ describe("doctor command", () => { serviceIsLoaded.mockResolvedValueOnce(false); serviceInstall.mockClear(); - const { doctorCommand } = await import("./doctor.js"); await doctorCommand(createDoctorRuntime()); expect(uninstallLegacyGatewayServices).not.toHaveBeenCalled(); @@ -108,7 +107,6 @@ describe("doctor command", () => { mockDoctorConfigSnapshot(); - const { doctorCommand } = await import("./doctor.js"); await doctorCommand(createDoctorRuntime()); expect(runGatewayUpdate).toHaveBeenCalledWith(expect.objectContaining({ cwd: root })); diff --git a/src/commands/doctor.migrates-slack-discord-dm-policy-aliases.test.ts b/src/commands/doctor.migrates-slack-discord-dm-policy-aliases.test.ts index 89321a1dbbf..5dcec07fd23 100644 --- a/src/commands/doctor.migrates-slack-discord-dm-policy-aliases.test.ts +++ b/src/commands/doctor.migrates-slack-discord-dm-policy-aliases.test.ts @@ -2,6 +2,7 @@ import { describe, expect, it, vi } from "vitest"; import { readConfigFileSnapshot, writeConfigFile } from "./doctor.e2e-harness.js"; const DOCTOR_MIGRATION_TIMEOUT_MS = 20_000; +const { doctorCommand } = await import("./doctor.js"); describe("doctor command", () => { it( @@ -31,7 +32,6 @@ describe("doctor command", () => { legacyIssues: [], }); - const { doctorCommand } = await import("./doctor.js"); const runtime = { log: vi.fn(), error: vi.fn(), exit: vi.fn() }; await doctorCommand(runtime, { nonInteractive: true, repair: true });