From a186dccaf6e7640c6dde2ca32bd67aee36dea653 Mon Sep 17 00:00:00 2001 From: gsxdsm Date: Tue, 30 Jun 2026 18:39:52 -0700 Subject: [PATCH] test(auth): stub auth route CLI probes --- .../src/__tests__/routes-auth.test.ts | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/dashboard/src/__tests__/routes-auth.test.ts b/packages/dashboard/src/__tests__/routes-auth.test.ts index c82b24fc5f..e930cc0425 100644 --- a/packages/dashboard/src/__tests__/routes-auth.test.ts +++ b/packages/dashboard/src/__tests__/routes-auth.test.ts @@ -1175,6 +1175,31 @@ describe("Droid CLI auth routes", () => { getSettings: vi.fn().mockResolvedValue({ useDroidCli: false }), }), }); + + /* + FNXC:DashboardTests 2026-06-30-17:15 (FN-5048 — no slow tests): + GET /auth/status probes claude/cursor/llama CLIs UNCONDITIONALLY (register-auth-routes.ts: + probeClaudeCli/probeCursorCliProvider/probeLlamaCpp run regardless of the enabled toggle). + The two /auth/status tests in this describe previously mocked only probeDroidCli, so the + other three ran real subprocess probes and each blocked on a real CLI-absent timeout — ~6s + per test (12s of the suite's wall time). Stub every CLI probe here so no real subprocess or + wall-clock wait remains; the droid-specific tests still override probeDroidCli as needed. + */ + vi.spyOn(claudeCliProbeModule, "probeClaudeCli").mockResolvedValue({ + available: false, + reason: "mocked unavailable", + probeDurationMs: 0, + }); + vi.spyOn(runtimeProviderProbesModule, "probeCursorCliProvider").mockResolvedValue({ + available: false, + reason: "mocked unavailable", + probeDurationMs: 0, + }); + vi.spyOn(llamaCppProbeModule, "probeLlamaCpp").mockResolvedValue({ + available: false, + reason: "mocked unavailable", + probeDurationMs: 0, + }); }); function buildApp(options?: Parameters[1]) {