@@ -758,14 +758,14 @@ function formatValue(ctx, value, recurseTimes) {
758
758
if ( ctx . showHidden ) {
759
759
formatter = formatWeakSet ;
760
760
} else {
761
- extra = '<items unknown>' ;
761
+ extra = ctx . stylize ( '<items unknown>' , 'special' ) ;
762
762
}
763
763
} else if ( isWeakMap ( value ) ) {
764
764
braces [ 0 ] = `${ getPrefix ( constructor , tag , 'WeakMap' ) } {` ;
765
765
if ( ctx . showHidden ) {
766
766
formatter = formatWeakMap ;
767
767
} else {
768
- extra = '<items unknown>' ;
768
+ extra = ctx . stylize ( '<items unknown>' , 'special' ) ;
769
769
}
770
770
} else if ( types . isModuleNamespaceObject ( value ) ) {
771
771
braces [ 0 ] = `[${ tag } ] {` ;
@@ -1210,14 +1210,18 @@ function formatPromise(ctx, value, recurseTimes, keys) {
1210
1210
let output ;
1211
1211
const [ state , result ] = getPromiseDetails ( value ) ;
1212
1212
if ( state === kPending ) {
1213
- output = [ '<pending>' ] ;
1213
+ output = [ ctx . stylize ( '<pending>' , 'special' ) ] ;
1214
1214
} else {
1215
1215
// Using `formatValue` is correct here without the need to fix the
1216
1216
// indentation level.
1217
1217
ctx . indentationLvl += 2 ;
1218
1218
const str = formatValue ( ctx , result , recurseTimes ) ;
1219
1219
ctx . indentationLvl -= 2 ;
1220
- output = [ state === kRejected ? `<rejected> ${ str } ` : str ] ;
1220
+ output = [
1221
+ state === kRejected ?
1222
+ `${ ctx . stylize ( '<rejected>' , 'special' ) } ${ str } ` :
1223
+ str
1224
+ ] ;
1221
1225
}
1222
1226
for ( var n = 0 ; n < keys . length ; n ++ ) {
1223
1227
output . push ( formatProperty ( ctx , value , recurseTimes , keys [ n ] , 0 ) ) ;
0 commit comments