File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,8 +63,14 @@ function getTestCases(isWorker = false) {
6363
6464 function zeroExitWithUncaughtHandler ( ) {
6565 process . on ( 'exit' , ( code ) => {
66- assert . strictEqual ( process . exitCode , 0 ) ;
67- assert . strictEqual ( code , 0 ) ;
66+ if ( code !== 0 ) {
67+ console . log ( 'wrong code! expected 0; got' , code ) ;
68+ process . exit ( 99 ) ;
69+ }
70+ if ( process . exitCode !== undefined ) {
71+ console . log ( 'wrong exitCode! expected undefined; got' , process . exitCode ) ;
72+ process . exit ( 99 ) ;
73+ }
6874 } ) ;
6975 process . on ( 'uncaughtException' , ( ) => { } ) ;
7076 throw new Error ( 'ok' ) ;
@@ -73,8 +79,14 @@ function getTestCases(isWorker = false) {
7379
7480 function changeCodeInUncaughtHandler ( ) {
7581 process . on ( 'exit' , ( code ) => {
76- assert . strictEqual ( process . exitCode , 97 ) ;
77- assert . strictEqual ( code , 97 ) ;
82+ if ( code !== 97 ) {
83+ console . log ( 'wrong code! expected 97; got' , code ) ;
84+ process . exit ( 99 ) ;
85+ }
86+ if ( process . exitCode !== 97 ) {
87+ console . log ( 'wrong exitCode! expected 97; got' , process . exitCode ) ;
88+ process . exit ( 99 ) ;
89+ }
7890 } ) ;
7991 process . on ( 'uncaughtException' , ( ) => {
8092 process . exitCode = 97 ;
You can’t perform that action at this time.
0 commit comments