@@ -34,24 +34,24 @@ assert.strictEqual(util.inspect(false), 'false');
3434assert . strictEqual ( util . inspect ( '' ) , "''" ) ;
3535assert . strictEqual ( util . inspect ( 'hello' ) , "'hello'" ) ;
3636assert . strictEqual ( util . inspect ( function abc ( ) { } ) , '[Function: abc]' ) ;
37- assert . strictEqual ( util . inspect ( ( ) => { } ) , '[Function (anonymous) ]' ) ;
37+ assert . strictEqual ( util . inspect ( ( ) => { } ) , '[Function]' ) ;
3838assert . strictEqual (
3939 util . inspect ( async function ( ) { } ) ,
40- '[AsyncFunction (anonymous) ]'
40+ '[AsyncFunction]'
4141) ;
42- assert . strictEqual ( util . inspect ( async ( ) => { } ) , '[AsyncFunction (anonymous) ]' ) ;
42+ assert . strictEqual ( util . inspect ( async ( ) => { } ) , '[AsyncFunction]' ) ;
4343
4444// Special function inspection.
4545{
4646 const fn = ( ( ) => function * ( ) { } ) ( ) ;
4747 assert . strictEqual (
4848 util . inspect ( fn ) ,
49- '[GeneratorFunction (anonymous) ]'
49+ '[GeneratorFunction]'
5050 ) ;
5151 Object . setPrototypeOf ( fn , Object . getPrototypeOf ( async ( ) => { } ) ) ;
5252 assert . strictEqual (
5353 util . inspect ( fn ) ,
54- '[GeneratorFunction (anonymous) ] AsyncFunction'
54+ '[GeneratorFunction] AsyncFunction'
5555 ) ;
5656 Object . defineProperty ( fn , 'name' , { value : 5 , configurable : true } ) ;
5757 assert . strictEqual (
@@ -454,7 +454,7 @@ assert.strictEqual(
454454 value . aprop = 42 ;
455455 assert . strictEqual (
456456 util . inspect ( value ) ,
457- '[Function (anonymous) ] { aprop: 42 }'
457+ '[Function] { aprop: 42 }'
458458 ) ;
459459}
460460
@@ -1485,7 +1485,7 @@ util.inspect(process);
14851485 out = util . inspect ( o , { compact : false , breakLength : 3 } ) ;
14861486 expect = [
14871487 '{' ,
1488- ' a: [Function (anonymous) ],' ,
1488+ ' a: [Function],' ,
14891489 ' b: [Number: 3]' ,
14901490 '}'
14911491 ] . join ( '\n' ) ;
@@ -1494,7 +1494,7 @@ util.inspect(process);
14941494 out = util . inspect ( o , { compact : false , breakLength : 3 , showHidden : true } ) ;
14951495 expect = [
14961496 '{' ,
1497- ' a: [Function (anonymous) ] {' ,
1497+ ' a: [Function] {' ,
14981498 ' [length]: 0,' ,
14991499 " [name]: ''" ,
15001500 ' },' ,
@@ -1811,8 +1811,8 @@ assert.strictEqual(util.inspect('"\'${a}'), "'\"\\'${a}'");
18111811 [ new Number ( 55 ) , '[Number: 55]' ] ,
18121812 [ Object ( BigInt ( 55 ) ) , '[BigInt: 55n]' ] ,
18131813 [ Object ( Symbol ( 'foo' ) ) , '[Symbol: Symbol(foo)]' ] ,
1814- [ function ( ) { } , '[Function (anonymous) ]' ] ,
1815- [ ( ) => { } , '[Function (anonymous) ]' ] ,
1814+ [ function ( ) { } , '[Function]' ] ,
1815+ [ ( ) => { } , '[Function]' ] ,
18161816 [ [ 1 , 2 ] , '[ 1, 2 ]' ] ,
18171817 [ [ , , 5 , , , , ] , '[ <2 empty items>, 5, <3 empty items> ]' ] ,
18181818 [ { a : 5 } , '{ a: 5 }' ] ,
@@ -2003,11 +2003,11 @@ assert.strictEqual(
20032003 Object . setPrototypeOf ( obj , value ) ;
20042004 assert . strictEqual (
20052005 util . inspect ( obj ) ,
2006- '<[Function (null prototype) (anonymous) ]> { a: true }'
2006+ '<[Function (null prototype)]> { a: true }'
20072007 ) ;
20082008 assert . strictEqual (
20092009 util . inspect ( obj , { colors : true } ) ,
2010- '<\u001b[36m[Function (null prototype) (anonymous) ]\u001b[39m> ' +
2010+ '<\u001b[36m[Function (null prototype)]\u001b[39m> ' +
20112011 '{ a: \u001b[33mtrue\u001b[39m }'
20122012 ) ;
20132013
0 commit comments