@@ -360,13 +360,10 @@ function createErrDiff(actual, expected, operator) {
360360
361361 // Strict equal with identical objects that are not identical by reference.
362362 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:' ;
370367
371368 // We have to get the result again. The lines were all removed before.
372369 const actualLines = inspectValue ( actual ) ;
@@ -380,7 +377,7 @@ function createErrDiff(actual, expected, operator) {
380377 }
381378 }
382379
383- return `${ base } \n\n ${ actualLines . join ( '\n ' ) } \n` ;
380+ return `${ base } \n\n${ actualLines . join ( '\n' ) } \n` ;
384381 }
385382 return `${ msg } ${ skipped ? skippedMsg : '' } \n${ res } ${ other } ${ end } ` ;
386383}
@@ -448,7 +445,7 @@ class AssertionError extends Error {
448445 if ( res . length === 1 ) {
449446 super ( `${ base } ${ res [ 0 ] } ` ) ;
450447 } else {
451- super ( `${ base } \n\n ${ res . join ( '\n ' ) } \n` ) ;
448+ super ( `${ base } \n\n${ res . join ( '\n' ) } \n` ) ;
452449 }
453450 } else {
454451 let res = util . inspect ( actual ) ;
0 commit comments