From 8588ee1e4fedf0003150b16aed0243166821f0d8 Mon Sep 17 00:00:00 2001 From: Tom Haddad Date: Wed, 8 Nov 2023 14:12:26 +0000 Subject: [PATCH] test_runner: replace forEach with for of PR-URL: https://github.com/nodejs/node/pull/50595 Reviewed-By: Luigi Pinca Reviewed-By: Benjamin Gruenbaum Reviewed-By: Antoine du Hamel Reviewed-By: Moshe Atlow --- test/parallel/test-runner-mock-timers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-runner-mock-timers.js b/test/parallel/test-runner-mock-timers.js index f87ac8097c4e27..fae520b94cdf67 100644 --- a/test/parallel/test-runner-mock-timers.js +++ b/test/parallel/test-runner-mock-timers.js @@ -505,10 +505,10 @@ describe('Mock Timers Test Suite', () => { const finished = await intervalIterator.return(); assert.deepStrictEqual(finished, { done: true, value: undefined }); - results.forEach((result) => { + for (const result of results) { assert.strictEqual(typeof result.value, 'number'); assert.strictEqual(result.done, false); - }); + } }); it('should tick five times testing a real use case', async (t) => { t.mock.timers.enable({ apis: ['setInterval'] });