Skip to content

Commit

Permalink
test: replace forEach() with for...of
Browse files Browse the repository at this point in the history
Replace `Array.prototype.forEach()` with `for...of` in
`parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js`.

PR-URL: #50608
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
Alexander Jones authored and lpinca committed Dec 29, 2023
1 parent ecaf9c3 commit 55f3993
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const bad = [
},
];

bad.forEach((t) => {
for (const t of bad) {
assert.throws(
() => {
new TextDecoder(t.encoding, { fatal: true })
Expand All @@ -53,4 +53,4 @@ bad.forEach((t) => {
name: 'TypeError'
}
);
});
}

0 comments on commit 55f3993

Please sign in to comment.