]> Piment Noir Git Repositories - poolifier.git/commitdiff
test: use portable cluster stdio on Windows
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 14 Oct 2026 21:52:28 +0000 (23:52 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Wed, 14 Oct 2026 21:52:28 +0000 (23:52 +0200)
tests/pools/prototype-pollution.test.mjs

index b851caccbb407dc17bb5004ed323689c68e9699d..e1200ea8fcbdce8c7bef59f77633d8df6425c118 100644 (file)
@@ -314,6 +314,11 @@ describe('Worker option prototype pollution', () => {
         )
       )
       clearPrototypePollution()
+      if (process.platform === 'win32') {
+        // Node.js cannot pass a connected TCP socket as child process stdio on
+        // Windows. The socket is only needed to exercise native handle checks.
+        cluster.setupPrimary({ stdio: ['ignore', 'ignore', 'ignore', 'ipc'] })
+      }
       polluteObjectPrototype('handle', 'polluted')
       pool.start()
       clearPrototypePollution()