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); - }); + } }