docs: fix docs/worker-choice-strategies.md structure
[poolifier.git] / tests / pools / thread / fixed.test.js
index e4b99a6378d226535f83e47fb5516e3d394212f2..080ebad6ec8fa19b682bff11ae0f6634802c393e 100644 (file)
@@ -1,6 +1,6 @@
 const { expect } = require('expect')
 const { FixedThreadPool, PoolEvents } = require('../../../lib')
-const { WorkerFunctions } = require('../../test-types')
+const { TaskFunctions } = require('../../test-types')
 const { waitPoolEvents, waitWorkerEvents } = require('../../test-utils')
 
 describe('Fixed thread pool test suite', () => {
@@ -27,7 +27,7 @@ describe('Fixed thread pool test suite', () => {
   const emptyPool = new FixedThreadPool(
     numberOfThreads,
     './tests/worker-files/thread/emptyWorker.js',
-    { exitHandler: () => console.log('empty pool worker exited') }
+    { exitHandler: () => console.info('empty pool worker exited') }
   )
   const echoPool = new FixedThreadPool(
     numberOfThreads,
@@ -64,11 +64,11 @@ describe('Fixed thread pool test suite', () => {
 
   it('Verify that the function is executed in a worker thread', async () => {
     let result = await pool.execute({
-      function: WorkerFunctions.fibonacci
+      function: TaskFunctions.fibonacci
     })
     expect(result).toBe(75025)
     result = await pool.execute({
-      function: WorkerFunctions.factorial
+      function: TaskFunctions.factorial
     })
     expect(result).toBe(9.33262154439441e157)
   })