Skip to content

Commit 85ee2f7

Browse files
Alexander JonesRafaelGSS
Alexander Jones
authored andcommitted
test: replace forEach() with for...of
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>
1 parent 549e4b4 commit 85ee2f7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const bad = [
4343
},
4444
];
4545

46-
bad.forEach((t) => {
46+
for (const t of bad) {
4747
assert.throws(
4848
() => {
4949
new TextDecoder(t.encoding, { fatal: true })
@@ -53,4 +53,4 @@ bad.forEach((t) => {
5353
name: 'TypeError'
5454
}
5555
);
56-
});
56+
}

0 commit comments

Comments
 (0)