test: improve cluster settings coverage
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 17 May 2024 12:33:48 +0000 (14:33 +0200)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Fri, 17 May 2024 12:33:48 +0000 (14:33 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@piment-noir.org>
tests/pools/cluster/fixed.test.mjs

index ad7c003a97e675687b6ceb2df155cbc72a784591..a2fd1b6aae2f1bf46c0351635ee3d21e1bd6bc43 100644 (file)
@@ -1,3 +1,5 @@
+import cluster from 'node:cluster'
+
 import { expect } from 'expect'
 
 import { FixedClusterPool, PoolEvents } from '../../../lib/index.cjs'
@@ -300,6 +302,11 @@ describe('Fixed cluster pool test suite', () => {
       silent: true,
       exec: workerFilePath
     })
+    expect(cluster.settings).toMatchObject({
+      args: ['--use', 'http'],
+      silent: true,
+      exec: workerFilePath
+    })
     await pool.destroy()
   })