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 ea25015 commit cea0068Copy full SHA for cea0068
1 file changed
test/unit/vscode-shim-register.ts
@@ -307,10 +307,7 @@ try {
307
// ignore
308
}
309
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
-}
+// Safety net: force exit after 30 s if open handles (e.g. timers from
+// imported extension code) prevent the process from exiting after tests.
+// The timer is unref()'d so it won't keep the process alive on its own.
+setTimeout(() => process.exit(process.exitCode ?? 0), 30_000).unref();
0 commit comments