From 924b3313fe1471325a75707eb4e68f05bef2ff90 Mon Sep 17 00:00:00 2001 From: Gabriel Bota <94833492+dygabo@users.noreply.github.com> Date: Fri, 10 Nov 2023 10:36:27 +0100 Subject: [PATCH] test: replace forEach with for [...] of MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/50615 Reviewed-By: Tobias Nießen Reviewed-By: Debadree Chatterjee --- test/parallel/test-fs-timestamp-parsing-error.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-fs-timestamp-parsing-error.js b/test/parallel/test-fs-timestamp-parsing-error.js index 1fe0294f68b714..b3fd3e23dfcc35 100644 --- a/test/parallel/test-fs-timestamp-parsing-error.js +++ b/test/parallel/test-fs-timestamp-parsing-error.js @@ -3,7 +3,7 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); -[Infinity, -Infinity, NaN].forEach((input) => { +for (const input of [Infinity, -Infinity, NaN]) { assert.throws( () => { fs._toUnixTimestamp(input); @@ -12,7 +12,7 @@ const fs = require('fs'); code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); -}); +} assert.throws( () => { @@ -24,6 +24,6 @@ assert.throws( }); const okInputs = [1, -1, '1', '-1', Date.now()]; -okInputs.forEach((input) => { +for (const input of okInputs) { fs._toUnixTimestamp(input); -}); +}