File tree 1 file changed +16
-4
lines changed
1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -63,8 +63,14 @@ function getTestCases(isWorker = false) {
63
63
64
64
function zeroExitWithUncaughtHandler ( ) {
65
65
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
+ }
68
74
} ) ;
69
75
process . on ( 'uncaughtException' , ( ) => { } ) ;
70
76
throw new Error ( 'ok' ) ;
@@ -73,8 +79,14 @@ function getTestCases(isWorker = false) {
73
79
74
80
function changeCodeInUncaughtHandler ( ) {
75
81
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
+ }
78
90
} ) ;
79
91
process . on ( 'uncaughtException' , ( ) => {
80
92
process . exitCode = 97 ;
You can’t perform that action at this time.
0 commit comments