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 RafaelGSS committed Jan 2, 2024
1 parent 549e4b4 commit 85ee2f7
Showing 1 changed file with 2 additions and 2 deletions.
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 85ee2f7

Please sign in to comment.