1
mirror of https://github.com/jakejarvis/domainstack.io.git synced 2025-12-02 19:33:48 -05:00

fix: update testing configuration to use threads pool for compatibility with sandboxed environments

This commit is contained in:
2025-11-18 23:47:09 -05:00
parent d12fc11936
commit c1ef7dd05c
2 changed files with 4 additions and 2 deletions

View File

@@ -46,6 +46,7 @@
## Testing Guidelines
- Use **Vitest** with React Testing Library; config in `vitest.config.ts`.
- Uses `threads` pool for compatibility with sandboxed environments (e.g., Cursor agent commands).
- Global setup in `vitest.setup.ts`:
- Mocks analytics clients/servers (`@/lib/analytics/server` and `@/lib/analytics/client`).
- Mocks `server-only` module.

View File

@@ -14,7 +14,8 @@ export default defineConfig({
reporter: ["text", "html", "lcov"],
exclude: ["**/components/ui/**", ...coverageConfigDefaults.exclude],
},
// Use forks pool for better isolation and to prevent file handle leaks
pool: "forks",
// Use threads pool for compatibility with sandboxed environments
// File handle cleanup is managed by afterAll hooks in test files (e.g., PGlite.close())
pool: "threads",
},
});