- Replace environmentMatchGlobs with explicit Vitest test.projects entries for desktop and desktop-renderer suites - Keep desktop core tests on the threads pool and renderer tests in a jsdom-targeted project - Increase the batch-import 429 retry test timeout from 30s to 60s to reduce CI flakiness
30 lines
661 B
TypeScript
30 lines
661 B
TypeScript
import { defineConfig } from "vitest/config";
|
|
|
|
const maxWorkers = Number.parseInt(process.env.VITEST_MAX_WORKERS ?? "16", 10);
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
testTimeout: 30_000,
|
|
hookTimeout: 30_000,
|
|
maxWorkers,
|
|
fileParallelism: true,
|
|
passWithNoTests: true,
|
|
projects: [
|
|
{
|
|
test: {
|
|
name: "desktop",
|
|
include: ["src/__tests__/**/*.test.ts"],
|
|
pool: "threads",
|
|
},
|
|
},
|
|
{
|
|
test: {
|
|
name: "desktop-renderer",
|
|
include: ["src/renderer/**/*.test.ts", "src/renderer/**/*.test.tsx"],
|
|
environment: "jsdom",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
});
|