mirror of
https://github.com/nodejs/node.git
synced 2026-11-27 17:52:27 -05:00
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:
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'
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user