From a9d290956e68b47c6a1d9249cf5d3abfdaff284f Mon Sep 17 00:00:00 2001 From: Honza Machala Date: Sun, 19 Nov 2023 21:29:56 +0100 Subject: [PATCH] test: replace forEach in whatwg-encoding-custom-interop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/50607 Reviewed-By: Tobias Nießen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-whatwg-encoding-custom-interop.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-whatwg-encoding-custom-interop.js b/test/parallel/test-whatwg-encoding-custom-interop.js index 592dcc8582816f..80d088f6ce3741 100644 --- a/test/parallel/test-whatwg-encoding-custom-interop.js +++ b/test/parallel/test-whatwg-encoding-custom-interop.js @@ -56,9 +56,9 @@ assert(TextEncoder); encodingGetter.call(instance); const invalidThisArgs = [{}, [], true, 1, '', new TextDecoder()]; - invalidThisArgs.forEach((i) => { + for (const i of invalidThisArgs) { assert.throws(() => inspectFn.call(i, Infinity, {}), expectedError); assert.throws(() => encodeFn.call(i), expectedError); assert.throws(() => encodingGetter.call(i), expectedError); - }); + } }