X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fpools%2Fcluster%2Ffixed.test.js;h=908acbfe84530f59d3facb59cfec315df7333cd1;hb=aee467366d8c393b79e7af82c6a7ab12338ee64e;hp=ae899625dd9341dc4f9cfad3f40fab109587eb27;hpb=ffcbbad84f63b8a77f2b1a08f82deef5430f646e;p=poolifier.git diff --git a/tests/pools/cluster/fixed.test.js b/tests/pools/cluster/fixed.test.js index ae899625..908acbfe 100644 --- a/tests/pools/cluster/fixed.test.js +++ b/tests/pools/cluster/fixed.test.js @@ -1,5 +1,5 @@ const { expect } = require('expect') -const { FixedClusterPool } = require('../../../lib/index') +const { FixedClusterPool, PoolEvents } = require('../../../lib/index') const { WorkerFunctions } = require('../../test-types') const TestUtils = require('../../test-utils') @@ -65,9 +65,9 @@ describe('Fixed cluster pool test suite', () => { expect(result).toBe(false) }) - it('Verify that busy event is emitted', async () => { + it("Verify that 'busy' event is emitted", async () => { let poolBusy = 0 - pool.emitter.on('busy', () => ++poolBusy) + pool.emitter.on(PoolEvents.busy, () => ++poolBusy) for (let i = 0; i < numberOfWorkers * 2; i++) { pool.execute() }