test: replace forEach in whatwg-encoding-custom-interop

PR-URL: https://github.com/nodejs/node/pull/50607
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Honza Machala authored and GitHub committed 2023-11-19 20:29:56 +00:00
1 parent 48f32d71a5
commit 96890f6f33
1 file changed
+2 -2
@@ -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);
});
}
}