From 0762fbb185607e8a25553a90c30e87fb2b4b8aff Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 5 Apr 2023 15:36:11 +0200 Subject: [PATCH] test: cleanup worker function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- benchmarks/benchmarks-utils.js | 2 +- tests/test-utils.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) 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) { -- 2.34.1