Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Replace forEach() with for ... of in test-assert-typedarray-deepequal.js #50610

Closed
wants to merge 6 commits into from
12 changes: 6 additions & 6 deletions test/parallel/test-assert-typedarray-deepequal.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,22 @@ const notEqualArrayPairs = [
],
];

equalArrayPairs.forEach((arrayPair) => {
for (const arrayPair of equalArrayPairs) {
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(arrayPair[0], arrayPair[1]);
assert.deepStrictEqual(arrayPair[0], arrayPair[1]);
});
}

looseEqualArrayPairs.forEach((arrayPair) => {
for (const arrayPair of 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 of notEqualArrayPairs) {
assert.throws(
// eslint-disable-next-line no-restricted-properties
makeBlock(assert.deepEqual, arrayPair[0], arrayPair[1]),
Expand All @@ -88,4 +88,4 @@ notEqualArrayPairs.forEach((arrayPair) => {
makeBlock(assert.deepStrictEqual, arrayPair[0], arrayPair[1]),
assert.AssertionError
);
});
}
Loading