Skip to content

Commit c1ef7dd

Browse files
committed
fix: update testing configuration to use threads pool for compatibility with sandboxed environments
1 parent d12fc11 commit c1ef7dd

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

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

vitest.config.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export default defineConfig({
1414
reporter: ["text", "html", "lcov"],
1515
exclude: ["**/components/ui/**", ...coverageConfigDefaults.exclude],
1616
},
17-
// Use forks pool for better isolation and to prevent file handle leaks
18-
pool: "forks",
17+
// Use threads pool for compatibility with sandboxed environments
18+
// File handle cleanup is managed by afterAll hooks in test files (e.g., PGlite.close())
19+
pool: "threads",
1920
},
2021
});

0 commit comments

Comments
 (0)