File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -307,10 +307,7 @@ try {
307307 // ignore
308308}
309309
310- // Safety net for Node < 22 which lacks --test-force-exit.
311- // Without this, open handles (e.g. timers from imported extension code)
312- // prevent the process from exiting after tests complete.
313- const nodeMajor = parseInt ( process . versions . node . split ( '.' ) [ 0 ] , 10 ) ;
314- if ( nodeMajor < 22 ) {
315- setTimeout ( ( ) => process . exit ( process . exitCode ?? 0 ) , 30_000 ) . unref ( ) ;
316- }
310+ // Safety net: force exit after 30 s if open handles (e.g. timers from
311+ // imported extension code) prevent the process from exiting after tests.
312+ // The timer is unref()'d so it won't keep the process alive on its own.
313+ setTimeout ( ( ) => process . exit ( process . exitCode ?? 0 ) , 30_000 ) . unref ( ) ;
You can’t perform that action at this time.
0 commit comments