+ it("Verify that 'ready' event is emitted", async () => {
+ const pool1 = new FixedClusterPool(
+ numberOfWorkers,
+ './tests/worker-files/cluster/testWorker.js',
+ {
+ errorHandler: e => console.error(e)
+ }
+ )
+ let poolReady = 0
+ pool1.emitter.on(PoolEvents.ready, () => ++poolReady)
+ await waitPoolEvents(pool1, PoolEvents.ready, 1)
+ expect(poolReady).toBe(1)
+ })
+