theintern / intern

A next-generation code testing stack for JavaScript.
https://theintern.io/
Other
4.36k stars 311 forks source link

Ensure everything is stopped/canceled on SIGINT #1146

Open jason0x43 opened 4 years ago

jason0x43 commented 4 years ago

Intern and digdug intercept SIGINT to allow for a graceful shutdown. Currently Intern's SIGINT handler just shuts down the server in serve-only mode. In normal testing mode Intern will still wait for the test task to finish.

Intern should handle SIGINT by cancelling any running tasks and explicitly stopping the test server, if it's running. If coverage is enabled, SIGINT should prevent any further coverage collection, such as for covered but uninstrumented files.