X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=tests%2Fpools%2Fthread%2Fdynamic.test.js;h=959693901b22a6f9bda1d8d7be607cc8a40e82cc;hb=feec4213515cceb460e722dedca403914764b487;hp=11d91128f3dc2716ae3901b21a132e3aa10996dc;hpb=d710242dd39f5dd418b0a89536a9ad88c147fe3b;p=poolifier.git diff --git a/tests/pools/thread/dynamic.test.js b/tests/pools/thread/dynamic.test.js index 11d91128..95969390 100644 --- a/tests/pools/thread/dynamic.test.js +++ b/tests/pools/thread/dynamic.test.js @@ -1,5 +1,5 @@ const { expect } = require('expect') -const { DynamicThreadPool, PoolEvents } = require('../../../lib/index') +const { DynamicThreadPool, PoolEvents } = require('../../../lib') const { WorkerFunctions } = require('../../test-types') const TestUtils = require('../../test-utils') @@ -19,11 +19,11 @@ describe('Dynamic thread pool test suite', () => { let result = await pool.execute({ function: WorkerFunctions.fibonacci }) - expect(result).toBe(false) + expect(result).toBe(121393) result = await pool.execute({ function: WorkerFunctions.factorial }) - expect(result).toBe(false) + expect(result).toBe(9.33262154439441e157) }) it('Verify that new workers are created when required, max size is not exceeded and that after a while new workers will die', async () => { @@ -66,7 +66,7 @@ describe('Dynamic thread pool test suite', () => { it('Validation of inputs test', () => { expect(() => new DynamicThreadPool(min)).toThrowError( - new Error('Please specify a file with a worker implementation') + 'Please specify a file with a worker implementation' ) })