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 <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Alexander Jones authored and richardlau committed Mar 25, 2024
1 parent a98102a commit 06a6eef
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 06a6eef

Please sign in to comment.