-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
outputting coverage when process.exit() is called #2
Comments
It'd be awesome to solve this using the current V8 API; but if that turns out to be a bad solution I could imagine emitting an inspector event on Isolate teardown containing all remaining coverage information. Just an idea so far, not sure how happy inspector folks would be about that. |
@schuay looping in @TimothyGu and @eugeneo, who look to have done a chunk of the work on the Inspector binding in Node.js. The approach I outlined above doesn't quite work. Calling Even though this is potentially a bug we can fix in Node, as you point out @schuay, it might be a bit nicer to change around the API a bit so that you can more easily execute an operation as soon as your application has completed execution; maybe I'm just missing something? |
digging into this a bit more, I was able to get things to terminate in |
How about |
@TimothyGu good idea, I called This seems to work well if the application exits normally, or if the application throws an exception. If the program exits due to a this is definitely progress! |
there's an event that fires when a script finishes execution that we can wire into. |
I think @chrisdickonson came up with a good idea for how to approach this, if we capture an event on process.exit, we'll use
spawnSync
to output coverage in a subprocess.CC: @schuay, @bmeck
The text was updated successfully, but these errors were encountered: