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>
10 lines
365 B
TypeScript
10 lines
365 B
TypeScript
import { bootstrapTestDatabase } from "../test-db";
|
|
|
|
/**
|
|
* Playwright global setup: ensure the dedicated test database exists, is
|
|
* migrated, seeded and emptied before the dev server (started by webServer
|
|
* with DATABASE_URI pointed at it) serves the e2e suite.
|
|
*/
|
|
export default async function globalSetup(): Promise<void> {
|
|
await bootstrapTestDatabase();
|
|
}
|