Skip to content

Commit

Permalink
test: replace forEach in whatwg-encoding-custom-interop
Browse files Browse the repository at this point in the history
PR-URL: nodejs#50607
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
HonzaMac authored and martenrichter committed Nov 26, 2023
1 parent 9e10751 commit 398aa96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-whatwg-encoding-custom-interop.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}
}

0 comments on commit 398aa96

Please sign in to comment.