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

index a2fd1b6aae2f1bf46c0351635ee3d21e1bd6bc43..0397c797d53a547d1cf560c4520de2cadfafdd1e 100644 (file)
@@ -287,6 +287,10 @@ describe('Fixed cluster pool test suite', () => {
     let pool = new FixedClusterPool(numberOfWorkers, workerFilePath)
     expect(pool.opts.env).toBeUndefined()
     expect(pool.opts.settings).toBeUndefined()
+    expect(cluster.settings).toMatchObject({
+      exec: workerFilePath,
+      silent: false
+    })
     await pool.destroy()
     pool = new FixedClusterPool(numberOfWorkers, workerFilePath, {
       env: { TEST: 'test' },
@@ -297,11 +301,6 @@ describe('Fixed cluster pool test suite', () => {
       args: ['--use', 'http'],
       silent: true
     })
-    expect({ ...pool.opts.settings, exec: workerFilePath }).toStrictEqual({
-      args: ['--use', 'http'],
-      silent: true,
-      exec: workerFilePath
-    })
     expect(cluster.settings).toMatchObject({
       args: ['--use', 'http'],
       silent: true,