SIGINT (Ctrl+C) and SIGTERM are not handled
Open
bug
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
When executing this file with c8 I get the coverage information.
```js
function run() {
if (1) {
console.log(1);
} else {
console.log(2);
}
}
run();
setTimeout(process.exit, 3000)
```
However if I kill the process using Ctrl+C before the timeout, I don't get the coverage information for the code executed until that point.
Use case: I launch a service as a separate process and then launch integration tests (by sending requests to the service). Then I kill the service and check the coverage to make the tests pass. istanbul and nyc handle process kill correctly.
Contributor guide
Assessment
This issue has not been assessed yet.