From: Jérôme Benoit Date: Wed, 12 Jul 2023 11:26:11 +0000 (+0200) Subject: test: test for pool event emitter property X-Git-Tag: v2.6.17~24 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=393e2d28fa2af53ff3e271a96daa19080b83ee89;p=poolifier.git test: test for pool event emitter property Signed-off-by: Jérôme Benoit --- diff --git a/tests/test-utils.js b/tests/test-utils.js index 177a5c28..67d10e4a 100644 --- a/tests/test-utils.js +++ b/tests/test-utils.js @@ -23,7 +23,7 @@ const waitPoolEvents = async (pool, poolEvent, numberOfEventsToWait) => { if (numberOfEventsToWait === 0) { resolve(events) } - pool?.emitter.on(poolEvent, () => { + pool.emitter?.on(poolEvent, () => { ++events if (events === numberOfEventsToWait) { resolve(events)