From 85ee2f72557dd0394e4df32ee871d4f76d2554bd Mon Sep 17 00:00:00 2001 From: Alexander Jones Date: Fri, 10 Nov 2023 16:02:35 +0000 Subject: [PATCH] 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 Reviewed-By: James M Snell --- ...est-whatwg-encoding-custom-textdecoder-utf16-surrogates.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js index 2a8eac5f187406..a2a31af28c0c4e 100644 --- a/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js +++ b/test/parallel/test-whatwg-encoding-custom-textdecoder-utf16-surrogates.js @@ -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' } ); -}); +}