You've already forked domainstack.io
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:
@@ -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.
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user