We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 859e7f0 commit db9b6bbCopy full SHA for db9b6bb
packages/vitest/src/node/pool.ts
@@ -138,7 +138,10 @@ export function createPool(ctx: Vitest): WorkerPool {
138
return {
139
runTests: runWithFiles('run'),
140
close: async () => {
141
- await Promise.all(pool.threads.map(w => w.terminate()))
+ // node before 16.17 has a bug that causes FATAL ERROR because of the race condition
142
+ const nodeVersion = Number(process.version.match(/v(\d+)\.(\d+)/)?.[0].slice(1))
143
+ if (nodeVersion >= 16.17)
144
+ await Promise.all(pool.threads.map(w => w.terminate()))
145
},
146
}
147
0 commit comments