X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fcluster%2Ffixed.test.mjs;h=0397c797d53a547d1cf560c4520de2cadfafdd1e;hb=af66adf6d7514f45660caaded5e8b3f92aa41b7f;hp=ad7c003a97e675687b6ceb2df155cbc72a784591;hpb=e1ba9765afbf97436250d19f28c818221ebc10b9;p=poolifier.git diff --git a/tests/pools/cluster/fixed.test.mjs b/tests/pools/cluster/fixed.test.mjs index ad7c003a..0397c797 100644 --- a/tests/pools/cluster/fixed.test.mjs +++ b/tests/pools/cluster/fixed.test.mjs @@ -1,3 +1,5 @@ +import cluster from 'node:cluster' + import { expect } from 'expect' import { FixedClusterPool, PoolEvents } from '../../../lib/index.cjs' @@ -285,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' }, @@ -295,7 +301,7 @@ describe('Fixed cluster pool test suite', () => { args: ['--use', 'http'], silent: true }) - expect({ ...pool.opts.settings, exec: workerFilePath }).toStrictEqual({ + expect(cluster.settings).toMatchObject({ args: ['--use', 'http'], silent: true, exec: workerFilePath