From 4be3f3d8b826b61a05ac7f4a0d636d7d015f9ce3 Mon Sep 17 00:00:00 2001 From: Jia Date: Tue, 7 Nov 2023 10:31:57 -0500 Subject: [PATCH 1/6] Replace forEach() with for ... of and use destructuring in test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index a31da2739af93e..b4dfda751ea3d9 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -63,29 +63,29 @@ const notEqualArrayPairs = [ ], ]; -equalArrayPairs.forEach((arrayPair) => { +for (const arrayPair in equalArrayPairs) { // eslint-disable-next-line no-restricted-properties assert.deepEqual(arrayPair[0], arrayPair[1]); assert.deepStrictEqual(arrayPair[0], arrayPair[1]); -}); +}l -looseEqualArrayPairs.forEach((arrayPair) => { +for (const arrayPair in looseEqualArrayPairs) { // eslint-disable-next-line no-restricted-properties assert.deepEqual(arrayPair[0], arrayPair[1]); assert.throws( makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]), assert.AssertionError ); -}); +} -notEqualArrayPairs.forEach((arrayPair) => { +for (const arrayPair in notEqualArrayPairs) { assert.throws( // eslint-disable-next-line no-restricted-properties makeBlock(assert.deepEqual, arrayPair[0], arrayPair[1]), - assert.AssertionError + assert.AssertionErrorset ); assert.throws( makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]), assert.AssertionError ); -}); +} From 1e8da01b7618cfa4f3e0aae239572ed8dd5c3ea2 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 27 Dec 2023 08:10:21 +0100 Subject: [PATCH 2/6] Update test/parallel/test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index b4dfda751ea3d9..893c4b28cf9433 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -67,7 +67,7 @@ for (const arrayPair in equalArrayPairs) { // eslint-disable-next-line no-restricted-properties assert.deepEqual(arrayPair[0], arrayPair[1]); assert.deepStrictEqual(arrayPair[0], arrayPair[1]); -}l +} for (const arrayPair in looseEqualArrayPairs) { // eslint-disable-next-line no-restricted-properties From dfe34c4e97bc787c14e4fc21f47bcfd06feec75b Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 27 Dec 2023 08:10:26 +0100 Subject: [PATCH 3/6] Update test/parallel/test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index 893c4b28cf9433..97da2f52f954d6 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -82,7 +82,7 @@ for (const arrayPair in notEqualArrayPairs) { assert.throws( // eslint-disable-next-line no-restricted-properties makeBlock(assert.deepEqual, arrayPair[0], arrayPair[1]), - assert.AssertionErrorset + assert.AssertionError ); assert.throws( makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]), From 3c6fb914a75776a364ed58b5a35b8c48e7b8b2e6 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 27 Dec 2023 21:08:11 +0100 Subject: [PATCH 4/6] Update test/parallel/test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index 97da2f52f954d6..424bef41650e9d 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -63,7 +63,7 @@ const notEqualArrayPairs = [ ], ]; -for (const arrayPair in equalArrayPairs) { +for (const arrayPair of equalArrayPairs) { // eslint-disable-next-line no-restricted-properties assert.deepEqual(arrayPair[0], arrayPair[1]); assert.deepStrictEqual(arrayPair[0], arrayPair[1]); From 50bc7a86483762c23d56a77995a1e59b1c2ce739 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 27 Dec 2023 21:08:16 +0100 Subject: [PATCH 5/6] Update test/parallel/test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index 424bef41650e9d..5d85d5cdfcc98c 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -69,7 +69,7 @@ for (const arrayPair of equalArrayPairs) { assert.deepStrictEqual(arrayPair[0], arrayPair[1]); } -for (const arrayPair in looseEqualArrayPairs) { +for (const arrayPair of looseEqualArrayPairs) { // eslint-disable-next-line no-restricted-properties assert.deepEqual(arrayPair[0], arrayPair[1]); assert.throws( From 15ac2d21dbd1c3a7013af5038949b33acb224bd1 Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 27 Dec 2023 21:08:20 +0100 Subject: [PATCH 6/6] Update test/parallel/test-assert-typedarray-deepequal.js --- test/parallel/test-assert-typedarray-deepequal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/parallel/test-assert-typedarray-deepequal.js b/test/parallel/test-assert-typedarray-deepequal.js index 5d85d5cdfcc98c..aee5225ca1fe51 100644 --- a/test/parallel/test-assert-typedarray-deepequal.js +++ b/test/parallel/test-assert-typedarray-deepequal.js @@ -78,7 +78,7 @@ for (const arrayPair of looseEqualArrayPairs) { ); } -for (const arrayPair in notEqualArrayPairs) { +for (const arrayPair of notEqualArrayPairs) { assert.throws( // eslint-disable-next-line no-restricted-properties makeBlock(assert.deepEqual, arrayPair[0], arrayPair[1]),