@@ -758,14 +758,14 @@ function formatValue(ctx, value, recurseTimes) {
758758 if ( ctx . showHidden ) {
759759 formatter = formatWeakSet ;
760760 } else {
761- extra = '<items unknown>' ;
761+ extra = ctx . stylize ( '<items unknown>' , 'special' ) ;
762762 }
763763 } else if ( isWeakMap ( value ) ) {
764764 braces [ 0 ] = `${ getPrefix ( constructor , tag , 'WeakMap' ) } {` ;
765765 if ( ctx . showHidden ) {
766766 formatter = formatWeakMap ;
767767 } else {
768- extra = '<items unknown>' ;
768+ extra = ctx . stylize ( '<items unknown>' , 'special' ) ;
769769 }
770770 } else if ( types . isModuleNamespaceObject ( value ) ) {
771771 braces [ 0 ] = `[${ tag } ] {` ;
@@ -1210,14 +1210,18 @@ function formatPromise(ctx, value, recurseTimes, keys) {
12101210 let output ;
12111211 const [ state , result ] = getPromiseDetails ( value ) ;
12121212 if ( state === kPending ) {
1213- output = [ '<pending>' ] ;
1213+ output = [ ctx . stylize ( '<pending>' , 'special' ) ] ;
12141214 } else {
12151215 // Using `formatValue` is correct here without the need to fix the
12161216 // indentation level.
12171217 ctx . indentationLvl += 2 ;
12181218 const str = formatValue ( ctx , result , recurseTimes ) ;
12191219 ctx . indentationLvl -= 2 ;
1220- output = [ state === kRejected ? `<rejected> ${ str } ` : str ] ;
1220+ output = [
1221+ state === kRejected ?
1222+ `${ ctx . stylize ( '<rejected>' , 'special' ) } ${ str } ` :
1223+ str
1224+ ] ;
12211225 }
12221226 for ( var n = 0 ; n < keys . length ; n ++ ) {
12231227 output . push ( formatProperty ( ctx , value , recurseTimes , keys [ n ] , 0 ) ) ;
0 commit comments