repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build(deps-dev): apply updates
[poolifier.git]
/
tests
/
pools
/
thread
/
dynamic.test.js
diff --git
a/tests/pools/thread/dynamic.test.js
b/tests/pools/thread/dynamic.test.js
index 0eab0381143f1267cdc506e9d6e9bf77d93da0f3..1c5997ccf510baacc45c69337ec24965390b7e4d 100644
(file)
--- a/
tests/pools/thread/dynamic.test.js
+++ b/
tests/pools/thread/dynamic.test.js
@@
-57,8
+57,13
@@
describe('Dynamic thread pool test suite', () => {
it('Shutdown test', async () => {
const exitPromise = waitWorkerEvents(pool, 'exit', min)
it('Shutdown test', async () => {
const exitPromise = waitWorkerEvents(pool, 'exit', min)
+ expect(pool.emitter.eventNames()).toStrictEqual([PoolEvents.busy])
let poolDestroy = 0
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
let poolDestroy = 0
pool.emitter.on(PoolEvents.destroy, () => ++poolDestroy)
+ expect(pool.emitter.eventNames()).toStrictEqual([
+ PoolEvents.busy,
+ PoolEvents.destroy
+ ])
await pool.destroy()
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)
await pool.destroy()
const numberOfExitEvents = await exitPromise
expect(pool.started).toBe(false)