@@ -360,13 +360,10 @@ function createErrDiff(actual, expected, operator) {
360
360
361
361
// Strict equal with identical objects that are not identical by reference.
362
362
if ( identical === maxLines ) {
363
- let base = 'Input object identical but not reference equal:' ;
364
-
365
- if ( operator !== 'strictEqual' ) {
366
- // This code path should not be possible to reach.
367
- // The output is identical but it is not clear why.
368
- base = 'Input objects not identical:' ;
369
- }
363
+ // E.g., assert.deepStrictEqual(Symbol(), Symbol())
364
+ const base = operator === 'strictEqual' ?
365
+ 'Input objects identical but not reference equal:' :
366
+ 'Input objects not identical:' ;
370
367
371
368
// We have to get the result again. The lines were all removed before.
372
369
const actualLines = inspectValue ( actual ) ;
@@ -380,7 +377,7 @@ function createErrDiff(actual, expected, operator) {
380
377
}
381
378
}
382
379
383
- return `${ base } \n\n ${ actualLines . join ( '\n ' ) } \n` ;
380
+ return `${ base } \n\n${ actualLines . join ( '\n' ) } \n` ;
384
381
}
385
382
return `${ msg } ${ skipped ? skippedMsg : '' } \n${ res } ${ other } ${ end } ` ;
386
383
}
@@ -448,7 +445,7 @@ class AssertionError extends Error {
448
445
if ( res . length === 1 ) {
449
446
super ( `${ base } ${ res [ 0 ] } ` ) ;
450
447
} else {
451
- super ( `${ base } \n\n ${ res . join ( '\n ' ) } \n` ) ;
448
+ super ( `${ base } \n\n${ res . join ( '\n' ) } \n` ) ;
452
449
}
453
450
} else {
454
451
let res = util . inspect ( actual ) ;
0 commit comments