test: remove timing races from screen-sync and route transition tests (#138) (#166)
Frontend verify / commits (push) Skipped
Frontend verify / security (push) Successful in 13s
Frontend verify / verify (push) Failing after 9m3s

This commit was merged in pull request #166.
This commit is contained in:
2026-11-07 18:44:44 +03:00
parent cc45352243
commit d910d624d6
2 changed files with 29 additions and 6 deletions
+4
View File
@@ -1,5 +1,6 @@
import "@testing-library/jest-dom/vitest";
import { cleanup, configure } from "@testing-library/react";
import { MotionGlobalConfig } from "motion/react";
import { afterAll, afterEach, beforeAll, vi } from "vitest";
import { configureAuthClient } from "@/shared/api";
@@ -10,6 +11,9 @@ import { server } from "./server";
// Allow async UI updates on the slower CI runner; local waits stay unchanged.
if (process.env.CI) configure({ asyncUtilTimeout: 5000 });
// Route fades start at opacity 0; under load toBeVisible can catch that frame.
MotionGlobalConfig.skipAnimations = true;
beforeAll(() => server.listen({ onUnhandledRequest: "error" }));
afterEach(() => {
cleanup();