There was an error while loading. Please reload this page.
--cpu-prof
--heap-prof
1 parent 1800167 commit 2e4d894Copy full SHA for 2e4d894
packages/vitest/src/runtime/worker.ts
@@ -11,6 +11,21 @@ import { disposeInternalListeners } from './workers/utils'
11
12
if (isChildProcess()) {
13
setProcessTitle(`vitest ${poolId}`)
14
+
15
+ const isProfiling = process.execArgv.some(
16
+ execArg =>
17
+ execArg.startsWith('--prof')
18
+ || execArg.startsWith('--cpu-prof')
19
+ || execArg.startsWith('--heap-prof')
20
+ || execArg.startsWith('--diagnostic-dir'),
21
+ )
22
23
+ if (isProfiling) {
24
+ // Work-around for nodejs/node#55094
25
+ process.on('SIGTERM', () => {
26
+ process.exit()
27
+ })
28
+ }
29
}
30
31
// this is what every pool executes when running tests
0 commit comments