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