1
0
Fork 0
polaris-task-force/vitest.config.mts
Z8MB1E 8135c9850b feat(test): run tests against a dedicated truncated database
Bootstrap a per-run test database (ensure, push schema, truncate, seed baselines, repair sequences), wire vitest/playwright globals, and gate schema push behind DB_PUSH. Serial test files share the one database.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
2026-09-22 17:58:17 -04:00

17 lines
605 B
TypeScript

import { defineConfig } from "vitest/config";
import react from "@vitejs/plugin-react";
import tsconfigPaths from "vite-tsconfig-paths";
export default defineConfig({
plugins: [tsconfigPaths(), react()],
test: {
environment: "jsdom",
setupFiles: ["./vitest.setup.ts"],
include: ["tests/int/**/*.int.spec.ts"],
// Serial test files: every spec shares one test database, and parallel
// workers against it produced flaky cross-file interference.
fileParallelism: false,
globalSetup: ["./tests/vitest-global.ts"],
globalTeardown: ["./tests/vitest-teardown.ts"],
},
});