mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
Closes the "e2e never runs in CI" hole. Adds per-PR e2e smoke gate, nightly full-suite workflows, parallel vitest forks (per-fork DBs), Playwright parallel/serial/visual projects against production builds, metadata-generated test suites (drift guards, hostile inputs, format matrix, pairwise settings, property-based fuzz), Stryker mutation testing, Schemathesis API fuzz, coverage ratchet, and fixes for three session-poisoning bugs that caused 200+ serial-bucket failures. Bug fix included: favicon/split/bulk-rename could hang clients forever when ZIP streaming failed after reply.hijack().
14 lines
553 B
TypeScript
14 lines
553 B
TypeScript
import crypto from "node:crypto";
|
|
import os from "node:os";
|
|
import path from "node:path";
|
|
|
|
// Each Vitest fork gets its own SQLite DB + workspace so test files can run
|
|
// in parallel. setupFiles run before any test file (and therefore before any
|
|
// app module) loads, so apps/api/src/config.ts captures the per-fork paths.
|
|
const forkDir = path.join(
|
|
os.tmpdir(),
|
|
`SnapOtter-test-${process.pid}-${crypto.randomUUID().slice(0, 8)}`,
|
|
);
|
|
process.env.DB_PATH = path.join(forkDir, "test.db");
|
|
process.env.WORKSPACE_PATH = path.join(forkDir, "workspace");
|