@@ -717,14 +717,14 @@ function formatValue(ctx, value, recurseTimes) {
717
717
if ( ctx . showHidden ) {
718
718
formatter = formatWeakSet ;
719
719
} else {
720
- extra = '[items unknown]' ;
720
+ extra = ctx . stylize ( '[items unknown]' , 'special' ) ;
721
721
}
722
722
} else if ( isWeakMap ( value ) ) {
723
723
braces [ 0 ] = `${ getPrefix ( constructor , tag , 'WeakMap' ) } {` ;
724
724
if ( ctx . showHidden ) {
725
725
formatter = formatWeakMap ;
726
726
} else {
727
- extra = '[items unknown]' ;
727
+ extra = ctx . stylize ( '[items unknown]' , 'special' ) ;
728
728
}
729
729
} else if ( types . isModuleNamespaceObject ( value ) ) {
730
730
braces [ 0 ] = `[${ tag } ] {` ;
@@ -1162,14 +1162,18 @@ function formatPromise(ctx, value, recurseTimes, keys) {
1162
1162
let output ;
1163
1163
const [ state , result ] = getPromiseDetails ( value ) ;
1164
1164
if ( state === kPending ) {
1165
- output = [ '<pending>' ] ;
1165
+ output = [ ctx . stylize ( '<pending>' , 'special' ) ] ;
1166
1166
} else {
1167
1167
// Using `formatValue` is correct here without the need to fix the
1168
1168
// indentation level.
1169
1169
ctx . indentationLvl += 2 ;
1170
1170
const str = formatValue ( ctx , result , recurseTimes ) ;
1171
1171
ctx . indentationLvl -= 2 ;
1172
- output = [ state === kRejected ? `<rejected> ${ str } ` : str ] ;
1172
+ output = [
1173
+ state === kRejected ?
1174
+ `${ ctx . stylize ( '<rejected>' , 'special' ) } ${ str } ` :
1175
+ str
1176
+ ] ;
1173
1177
}
1174
1178
for ( var n = 0 ; n < keys . length ; n ++ ) {
1175
1179
output . push ( formatProperty ( ctx , value , recurseTimes , keys [ n ] , 0 ) ) ;
0 commit comments