File tree 1 file changed +2
-3
lines changed
1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -375,8 +375,7 @@ class AssertionError extends Error {
375
375
let res = inspectValue ( actual ) ;
376
376
let other = inspectValue ( expected ) ;
377
377
const knownOperators = kReadableOperator [ operator ] ;
378
- if ( ( operator === 'notDeepEqual' || operator === 'notEqual' ) &&
379
- res === other ) {
378
+ if ( operator === 'notDeepEqual' && res === other ) {
380
379
res = `${ knownOperators } \n\n${ res } ` ;
381
380
if ( res . length > 1024 ) {
382
381
res = `${ res . slice ( 0 , 1021 ) } ...` ;
@@ -389,7 +388,7 @@ class AssertionError extends Error {
389
388
if ( other . length > 512 ) {
390
389
other = `${ other . slice ( 0 , 509 ) } ...` ;
391
390
}
392
- if ( operator === 'deepEqual' || operator === 'equal' ) {
391
+ if ( operator === 'deepEqual' ) {
393
392
const eq = operator === 'deepEqual' ? 'deep-equal' : 'equal' ;
394
393
res = `${ knownOperators } \n\n${ res } \n\nshould loosely ${ eq } \n\n` ;
395
394
} else {
You can’t perform that action at this time.
0 commit comments