c8
c8 copied to clipboard
When using koa, it has no effect
After starting the Koa service, the browser accesses port 3000, and then checks the c8 report and finds that it has no effect
I had the same issue, however the issue is not coming from c8, it's from how Nodejs handle the flag NODE_V8_COVERAGE Here what i'm doing on my project (express):
function closeServer() {
server.close(() => {
process.exit(0);
})
}
process.on('SIGINT', closeServer)
process.on('SIGQUIT', closeServer)
process.on('SIGTERM', closeServer)
Closing the server properly before exiting the process. ref: https://github.com/nodejs/node/issues/29896
@bcoe I believe we can close this 😁
@olivierodo an you confirm that this works with never releases of Node.js that contain the fix @olivierodo points to?