docfast/vitest.config.ts
OpenClaw Bot b95994cc3c
All checks were successful
Build & Deploy to Staging / Build & Deploy to Staging (push) Successful in 12m28s
fix: make test suite runnable without DB/Chrome, add tests to CI
- Refactor index.ts to skip start() when NODE_ENV=test
- Add test setup with mocks for db, keys, browser, verification, email, usage
- Add vitest.config.ts with setup file
- Rewrite tests to work with mocks (42 tests, all passing)
- Add new tests: signup 410, recovery validation, CORS headers, error format, API root
- Add test step to CI pipeline before Docker build
2026-02-25 07:07:12 +00:00

9 lines
188 B
TypeScript

import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
setupFiles: ["src/__tests__/setup.ts"],
testTimeout: 15000,
hookTimeout: 15000,
},
});