test: allow UI scenarios more time in CI #1
Frontend verify / verify (push) Successful in 4m54s

This commit is contained in:
2026-09-13 16:31:02 +03:00
parent 2f26e4fe0d
commit 942ed3d453
2 changed files with 8 additions and 1 deletions
+4 -1
View File
@@ -1,10 +1,13 @@
import "@testing-library/jest-dom/vitest";
import { cleanup } from "@testing-library/react";
import { cleanup, configure } from "@testing-library/react";
import { afterAll, afterEach, beforeAll } from "vitest";
import { configureAuthClient } from "@/shared/api";
import "../shared/i18n";
import { server } from "./server";
// Allow async UI updates on the slower CI runner; local waits stay unchanged.
if (process.env.CI) configure({ asyncUtilTimeout: 5_000 });
beforeAll(() => server.listen({ onUnhandledRequest: "error" }));
afterEach(() => {
cleanup();
+4
View File
@@ -2,10 +2,14 @@ import { fileURLToPath, URL } from "node:url";
import react from "@vitejs/plugin-react";
import { configDefaults, defineConfig } from "vitest/config";
const CI_TEST_TIMEOUT_MS = 15_000;
export default defineConfig({
plugins: [react()],
resolve: { alias: { "@": fileURLToPath(new URL("./src", import.meta.url)) } },
test: {
// CI runs the UI scenarios with coverage on a slower runner.
testTimeout: process.env.CI ? CI_TEST_TIMEOUT_MS : undefined,
environment: "jsdom",
exclude: configDefaults.exclude,
setupFiles: "./src/test/setup.ts",