bcoe / bcoe/c8

SIGINT (Ctrl+C) and SIGTERM are not handled

Open
#189 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.