Skip to content

Commit 7cc21d8

Browse files
BridgeARtargos
authored andcommitted
assert: remove unused code
Those two operators are not used. PR-URL: #27676 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 47184d1 commit 7cc21d8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/internal/assert/assertion_error.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,7 @@ class AssertionError extends Error {
375375
let res = inspectValue(actual);
376376
let other = inspectValue(expected);
377377
const knownOperators = kReadableOperator[operator];
378-
if ((operator === 'notDeepEqual' || operator === 'notEqual') &&
379-
res === other) {
378+
if (operator === 'notDeepEqual' && res === other) {
380379
res = `${knownOperators}\n\n${res}`;
381380
if (res.length > 1024) {
382381
res = `${res.slice(0, 1021)}...`;
@@ -389,7 +388,7 @@ class AssertionError extends Error {
389388
if (other.length > 512) {
390389
other = `${other.slice(0, 509)}...`;
391390
}
392-
if (operator === 'deepEqual' || operator === 'equal') {
391+
if (operator === 'deepEqual') {
393392
const eq = operator === 'deepEqual' ? 'deep-equal' : 'equal';
394393
res = `${knownOperators}\n\n${res}\n\nshould loosely ${eq}\n\n`;
395394
} else {

0 commit comments

Comments
 (0)