test_runner: replace forEach with for of

PR-URL: https://github.com/nodejs/node/pull/50595
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
This commit is contained in:
Tom Haddad authored and Michaël Zasso committed 2023-11-14 09:17:58 +01:00
1 parent 05e8b6ef20
commit ae4a7ba991
1 file changed
+2 -2
+2 -2
View File
@@ -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'] });