mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-11 22:51:26 +00:00
- Add explicit test timeout (15s), hook timeout (10s), and teardown timeout (10s) to vitest config - Configure retry logic for CI environments to handle occasional flaky tests - Add asyncUtilTimeout configuration to testing library to fail faster - Resolves issue where tests would hang indefinitely in CI showing dots continuously Fixes the flaky test issue reported in GitHub Actions run 16625858640
27 lines
814 B
TypeScript
27 lines
814 B
TypeScript
import { defineConfig } from "vitest/config"
|
|
import path from "path"
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
globals: true,
|
|
setupFiles: ["./vitest.setup.ts"],
|
|
watch: false,
|
|
reporters: ["dot"],
|
|
silent: true,
|
|
environment: "jsdom",
|
|
include: ["src/**/*.spec.ts", "src/**/*.spec.tsx"],
|
|
// Add timeout configurations to prevent flaky tests in CI
|
|
testTimeout: 15000, // 15 seconds for individual tests (increased from default 5s)
|
|
hookTimeout: 10000, // 10 seconds for setup/teardown hooks
|
|
teardownTimeout: 10000, // 10 seconds for teardown
|
|
// Retry flaky tests once in CI environments
|
|
retry: process.env.CI ? 1 : 0,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"@src": path.resolve(__dirname, "./src"),
|
|
"@roo": path.resolve(__dirname, "../src/shared"),
|
|
},
|
|
},
|
|
})
|