refactor: split TestUtils class into arrow functions
[poolifier.git] / tests / pools / cluster / fixed.test.js
index ccdd287046017ab11b3dace1208543bfa4ad818a..48455f18011ded1507929a5a74bb06077fda45af 100644 (file)
@@ -1,7 +1,7 @@
 const { expect } = require('expect')
 const { FixedClusterPool, PoolEvents } = require('../../../lib')
 const { WorkerFunctions } = require('../../test-types')
-const TestUtils = require('../../test-utils')
+const { waitWorkerEvents } = require('../../test-utils')
 
 describe('Fixed cluster pool test suite', () => {
   const numberOfWorkers = 6
@@ -195,11 +195,7 @@ describe('Fixed cluster pool test suite', () => {
   })
 
   it('Shutdown test', async () => {
-    const exitPromise = TestUtils.waitWorkerEvents(
-      pool,
-      'exit',
-      numberOfWorkers
-    )
+    const exitPromise = waitWorkerEvents(pool, 'exit', numberOfWorkers)
     await pool.destroy()
     const numberOfExitEvents = await exitPromise
     expect(numberOfExitEvents).toBe(numberOfWorkers)