1
0
Fork 0
polaris-task-force/tests/vitest-global.ts
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

10 lines
350 B
TypeScript

import { bootstrapTestDatabase } from "./test-db";
/**
* Vitest global setup: point the suite at the dedicated test database and
* leave it in a known state (ensured, migrated, truncated, seeded, sequences
* repaired) before any test file loads.
*/
export default async function globalSetup(): Promise<void> {
await bootstrapTestDatabase();
}