Skip to content

Commit 1c659c2

Browse files
committed
process.exit doesn't work in the browser.
This causes some tests to time out instead of kill seneca. the [process shim](https://www.npmjs.com/package/process) only exists to provide the nextTick method. the ultimate reason is still rjrodger/use-plugin#4
1 parent 4857c8b commit 1c659c2

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

seneca.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -2123,8 +2123,10 @@ function makedie( instance, ctxt ) {
21232123
if( err ) console_error( err );
21242124
console_error( stderrmsg )
21252125
console_error("\n\nSENECA TERMINATED at "+(new Date().toISOString())+
2126-
". See above for error report.\n\n")
2127-
process.exit(1)
2126+
". See above for error report.\n\n")
2127+
2128+
// can not exit in the browser
2129+
//process.exit(1)
21282130
})
21292131
}
21302132
}
@@ -2137,7 +2139,8 @@ function makedie( instance, ctxt ) {
21372139
console_error( stderrmsg )
21382140
console_error("\n\nSENECA TERMINATED (on timeout) at "+(new Date().toISOString())+
21392141
".\n\n")
2140-
process.exit(2);
2142+
// can not exit in the browser
2143+
//process.exit(2);
21412144
}, so.deathdelay);
21422145
killtimer.unref();
21432146
}

0 commit comments

Comments
 (0)