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 @@
],
];

equalArrayPairs.forEach((arrayPair) => {
for (const arrayPair in equalArrayPairs) {
lpinca marked this conversation as resolved.
Show resolved Hide resolved
// eslint-disable-next-line no-restricted-properties
assert.deepEqual(arrayPair[0], arrayPair[1]);

Check failure on line 68 in test/parallel/test-assert-typedarray-deepequal.js

View workflow job for this annotation

GitHub Actions / test-macOS

--- stderr --- node:assert:126 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: '0' should loosely deep-equal undefined at Object.<anonymous> (/Users/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js:68:10) at Module._compile (node:internal/modules/cjs/loader:1378:14) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49 { generatedMessage: true, code: 'ERR_ASSERTION', actual: '0', expected: undefined, operator: 'deepEqual' } Node.js v22.0.0-pre Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /Users/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js

Check failure on line 68 in test/parallel/test-assert-typedarray-deepequal.js

View workflow job for this annotation

GitHub Actions / test-linux

--- stderr --- node:assert:126 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: '0' should loosely deep-equal undefined at Object.<anonymous> (/home/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js:68:10) at Module._compile (node:internal/modules/cjs/loader:1378:14) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49 { generatedMessage: true, code: 'ERR_ASSERTION', actual: '0', expected: undefined, operator: 'deepEqual' } Node.js v22.0.0-pre Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js

Check failure on line 68 in test/parallel/test-assert-typedarray-deepequal.js

View workflow job for this annotation

GitHub Actions / test-asan

--- stderr --- node:assert:126 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: '0' should loosely deep-equal undefined at Object.<anonymous> (/home/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js:68:10) at Module._compile (node:internal/modules/cjs/loader:1378:14) at Module._extensions..js (node:internal/modules/cjs/loader:1437:10) at Module.load (node:internal/modules/cjs/loader:1212:32) at Module._load (node:internal/modules/cjs/loader:1028:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) at node:internal/main/run_main_module:28:49 { generatedMessage: true, code: 'ERR_ASSERTION', actual: '0', expected: undefined, operator: 'deepEqual' } Node.js v22.0.0-pre Command: out/Release/node --test-reporter=spec --test-reporter-destination=stdout --test-reporter=./tools/github_reporter/index.js --test-reporter-destination=stdout /home/runner/work/node/node/test/parallel/test-assert-typedarray-deepequal.js
assert.deepStrictEqual(arrayPair[0], arrayPair[1]);
});
}

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