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: https://github.com/nodejs/node/pull/50608
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Alexander Jones authored and RafaelGSS committed 2024-01-02 15:05:28 -03:00
1 parent 549e4b4142
commit 85ee2f7255
1 file changed
+2 -2
@@ -43,7 +43,7 @@ const bad = [
},
];
bad.forEach((t) => {
for (const t of bad) {
assert.throws(
() => {
new TextDecoder(t.encoding, { fatal: true })
@@ -53,4 +53,4 @@ bad.forEach((t) => {
name: 'TypeError'
}
);
});
}