Files
frontend/vitest.config.ts
T
ksv741 942ed3d453
Frontend verify / verify (push) Successful in 4m54s
test: allow UI scenarios more time in CI #1
2026-09-13 16:31:02 +03:00

34 lines
851 B
TypeScript

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",
coverage: {
all: true,
include: ["src/**/*.{ts,tsx}"],
exclude: [
"src/test/**",
"src/**/*.test.{ts,tsx}",
"src/**/*.stories.tsx",
],
reporter: ["text", "html"],
thresholds: {
statements: 82,
branches: 75,
functions: 75,
lines: 83,
},
},
},
});