repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f821a84
)
Switch forEach loop to for of syntax
author
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 17 Nov 2022 23:07:39 +0000
(
00:07
+0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 17 Nov 2022 23:07:39 +0000
(
00:07
+0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
tests/test-utils.js
patch
|
blob
|
blame
|
history
diff --git
a/tests/test-utils.js
b/tests/test-utils.js
index f650af789867c1e87d56e963a210a9f4320a02c0..84bec7e560f7eae6a7bd9a420338b63ff866bec5 100644
(file)
--- a/
tests/test-utils.js
+++ b/
tests/test-utils.js
@@
-4,14
+4,14
@@
class TestUtils {
static async waitExits (pool, numberOfExitEventsToWait) {
return new Promise(resolve => {
let exitEvents = 0
-
pool.workers.forEach(w =>
{
- w.on('exit', () => {
+
for (const worker of pool.workers)
{
+ w
orker
.on('exit', () => {
exitEvents++
if (exitEvents === numberOfExitEventsToWait) {
resolve(exitEvents)
}
})
- }
)
+ }
})
}