@@ -27,19 +27,19 @@ function validate() {
2727
2828{
2929 // Test with no arguments.
30- process . report . triggerReport ( ) ;
30+ process . report . writeReport ( ) ;
3131 validate ( ) ;
3232}
3333
3434{
3535 // Test with an error argument.
36- process . report . triggerReport ( new Error ( 'test error' ) ) ;
36+ process . report . writeReport ( new Error ( 'test error' ) ) ;
3737 validate ( ) ;
3838}
3939
4040{
4141 // Test with a file argument.
42- const file = process . report . triggerReport ( 'custom-name-1.json' ) ;
42+ const file = process . report . writeReport ( 'custom-name-1.json' ) ;
4343 const absolutePath = path . join ( tmpdir . path , file ) ;
4444 assert . strictEqual ( helper . findReports ( process . pid , tmpdir . path ) . length , 0 ) ;
4545 assert . strictEqual ( file , 'custom-name-1.json' ) ;
@@ -49,8 +49,8 @@ function validate() {
4949
5050{
5151 // Test with file and error arguments.
52- const file = process . report . triggerReport ( 'custom-name-2.json' ,
53- new Error ( 'test error' ) ) ;
52+ const file = process . report . writeReport ( 'custom-name-2.json' ,
53+ new Error ( 'test error' ) ) ;
5454 const absolutePath = path . join ( tmpdir . path , file ) ;
5555 assert . strictEqual ( helper . findReports ( process . pid , tmpdir . path ) . length , 0 ) ;
5656 assert . strictEqual ( file , 'custom-name-2.json' ) ;
@@ -61,7 +61,7 @@ function validate() {
6161{
6262 // Test with a filename option.
6363 process . report . filename = 'custom-name-3.json' ;
64- const file = process . report . triggerReport ( ) ;
64+ const file = process . report . writeReport ( ) ;
6565 assert . strictEqual ( helper . findReports ( process . pid , tmpdir . path ) . length , 0 ) ;
6666 const filename = path . join ( process . report . directory , 'custom-name-3.json' ) ;
6767 assert . strictEqual ( file , process . report . filename ) ;
@@ -72,21 +72,21 @@ function validate() {
7272// Test with an invalid file argument.
7373[ null , 1 , Symbol ( ) , function ( ) { } ] . forEach ( ( file ) => {
7474 common . expectsError ( ( ) => {
75- process . report . triggerReport ( file ) ;
75+ process . report . writeReport ( file ) ;
7676 } , { code : 'ERR_INVALID_ARG_TYPE' } ) ;
7777} ) ;
7878
7979// Test with an invalid error argument.
8080[ null , 1 , Symbol ( ) , function ( ) { } , 'foo' ] . forEach ( ( error ) => {
8181 common . expectsError ( ( ) => {
82- process . report . triggerReport ( 'file' , error ) ;
82+ process . report . writeReport ( 'file' , error ) ;
8383 } , { code : 'ERR_INVALID_ARG_TYPE' } ) ;
8484} ) ;
8585
8686{
8787 // Test the special "stdout" filename.
8888 const args = [ '--experimental-report' , '-e' ,
89- 'process.report.triggerReport ("stdout")' ] ;
89+ 'process.report.writeReport ("stdout")' ] ;
9090 const child = spawnSync ( process . execPath , args , { cwd : tmpdir . path } ) ;
9191 assert . strictEqual ( child . status , 0 ) ;
9292 assert . strictEqual ( child . signal , null ) ;
@@ -97,7 +97,7 @@ function validate() {
9797{
9898 // Test the special "stderr" filename.
9999 const args = [ '--experimental-report' , '-e' ,
100- 'process.report.triggerReport ("stderr")' ] ;
100+ 'process.report.writeReport ("stderr")' ] ;
101101 const child = spawnSync ( process . execPath , args , { cwd : tmpdir . path } ) ;
102102 assert . strictEqual ( child . status , 0 ) ;
103103 assert . strictEqual ( child . signal , null ) ;
@@ -113,7 +113,7 @@ function validate() {
113113 const args = [ '--experimental-report' ,
114114 `--diagnostic-report-directory=${ reportDir } ` ,
115115 '-e' ,
116- 'process.report.triggerReport ()' ] ;
116+ 'process.report.writeReport ()' ] ;
117117 const child = spawnSync ( process . execPath , args , { cwd : tmpdir . path } ) ;
118118
119119 assert . strictEqual ( child . status , 0 ) ;
0 commit comments