mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
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:
parent
48f32d71a5
commit
96890f6f33
@ -56,9 +56,9 @@ assert(TextEncoder);
|
|||||||
encodingGetter.call(instance);
|
encodingGetter.call(instance);
|
||||||
|
|
||||||
const invalidThisArgs = [{}, [], true, 1, '', new TextDecoder()];
|
const invalidThisArgs = [{}, [], true, 1, '', new TextDecoder()];
|
||||||
invalidThisArgs.forEach((i) => {
|
for (const i of invalidThisArgs) {
|
||||||
assert.throws(() => inspectFn.call(i, Infinity, {}), expectedError);
|
assert.throws(() => inspectFn.call(i, Infinity, {}), expectedError);
|
||||||
assert.throws(() => encodeFn.call(i), expectedError);
|
assert.throws(() => encodeFn.call(i), expectedError);
|
||||||
assert.throws(() => encodingGetter.call(i), expectedError);
|
assert.throws(() => encodingGetter.call(i), expectedError);
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user