From: Jérôme Benoit Date: Wed, 5 Apr 2023 13:36:11 +0000 (+0200) Subject: test: cleanup worker function X-Git-Tag: v2.4.2~18 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=0762fbb185607e8a25553a90c30e87fb2b4b8aff;p=poolifier.git test: cleanup worker function Signed-off-by: Jérôme Benoit --- diff --git a/benchmarks/benchmarks-utils.js b/benchmarks/benchmarks-utils.js index e6abe96d..6eed668b 100644 --- a/benchmarks/benchmarks-utils.js +++ b/benchmarks/benchmarks-utils.js @@ -7,7 +7,7 @@ async function runPoolifierTest (pool, { tasks, workerData }) { pool .execute(workerData) .then(() => { - executions++ + ++executions if (executions === tasks) { return resolve({ ok: 1 }) } diff --git a/tests/test-utils.js b/tests/test-utils.js index 6d3592c1..89447169 100644 --- a/tests/test-utils.js +++ b/tests/test-utils.js @@ -77,9 +77,8 @@ class TestUtils { static factorial (n) { if (n === 0) { return 1 - } else { - return TestUtils.factorial(n - 1) * n } + return TestUtils.factorial(n - 1) * n } static executeWorkerFunction (data) {