Run app tests in forked Vitest workers

This commit is contained in:
Mohamed Boudra
2025-11-15 17:47:51 +01:00
parent e208f1c5bd
commit 37d0fe0637
2 changed files with 10 additions and 1 deletions
+7
View File
@@ -4,6 +4,13 @@ import path from "path";
export default defineConfig({
test: {
environment: "node",
/**
* Expo pulls in native tooling (xcode, etc.) that executes files relying on `process.send`.
* Vitest's default worker pool uses worker_threads, which intentionally stub that API and
* immediately throw `Unexpected call to process.send`. Running the suite in forked processes
* keeps `process.send` intact so the app tests can boot before hitting the intentional failures.
*/
pool: "forks",
},
resolve: {
alias: {