[test] # src/db/index.ts opens and migrates the database in its module body, before # any test file can override DATA_DIR. The preload repoints DATA_DIR at a # per-worker directory first. It lives here rather than only in the # package.json "test" script so that a bare `bun test` — what an IDE runs, and # what you type for a single file — cannot run against the real ./data. preload = ["./tests/preload.ts"] # Note: `parallel` and `isolate` are CLI-only, so a bare `bun test` runs the # whole suite in one process where the e2e files share a data directory and # stomp each other. Use `bun run test`. Single files work either way.