From c8673786ebd5823dc3aad313173785c87321cadf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Sun, 21 Jun 2026 12:55:13 +0200 Subject: [PATCH] test(integration): export the briefing window constant in the features mock The insights provider-chain integration test mocks @/lib/insights/features but omitted BRIEFING_FEATURE_WINDOW_DAYS, which the generate route now reads, so the route threw on access. Add it to the mock. --- tests/integration/insights-provider-chain.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/insights-provider-chain.test.ts b/tests/integration/insights-provider-chain.test.ts index b5d4027ca..0944b289f 100644 --- a/tests/integration/insights-provider-chain.test.ts +++ b/tests/integration/insights-provider-chain.test.ts @@ -52,6 +52,9 @@ vi.mock("@/lib/db-compat", () => ({ // the standard module mock works. vi.mock("@/lib/insights/features", () => ({ extractFeatures: vi.fn(async () => ({ stub: true })), + // v1.19.0 — the generate route reads the bounded briefing window constant; + // the mock must export it or the route throws on access. + BRIEFING_FEATURE_WINDOW_DAYS: 400, })); vi.mock("@/lib/insights/prompt", () => ({ getInsightsSystemPrompt: vi.fn(() => "system"),