FN-7464: speed up insights route retry tests
Collapse deliberate retry waits in the insights route test suite while preserving retry coverage. - Mock node:timers/promises in insights route tests so retry backoff resolves immediately. - Document the FN-7464 performance rationale with an FNXC dashboard test comment. Files changed: packages/dashboard/src/__tests__/insights-routes.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) Fusion-Task-Id: FN-7464 Fusion-Task-Lineage: a4a77c7e-61ba-4abd-be80-059a2df55add Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
This commit is contained in:
@@ -58,6 +58,18 @@ vi.mock("@fusion/engine", () => ({
|
||||
resolveMcpServersForStore: piMocks.resolveMcpServersForStore,
|
||||
}));
|
||||
|
||||
/*
|
||||
FNXC:DashboardTests 2026-07-03-02:12:
|
||||
FN-7464 measured the only remaining slow test-body seam as retryable insight-route failures waiting the production 250ms retry delay from node:timers/promises. Keep route-boundary retry coverage and assertions intact, but collapse that deliberate backoff in this file so the suite does not spend real wall time on retry pacing.
|
||||
*/
|
||||
vi.mock("node:timers/promises", async () => {
|
||||
const actual = await vi.importActual<typeof import("node:timers/promises")>("node:timers/promises");
|
||||
return {
|
||||
...actual,
|
||||
setTimeout: vi.fn(() => Promise.resolve()),
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock("../project-store-resolver.js", async () => {
|
||||
const actual = await vi.importActual<typeof import("../project-store-resolver.js")>("../project-store-resolver.js");
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user