-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add covenience util for debugging #225
Conversation
985040f
to
84c35ea
Compare
You need to add it to |
Oh sorry, I wasn't clear - I intended it just for internal development use. Not public consumption. I guess it would not be a terrible idea to publish it. We could ask users to execute tests with it and send the output. Might help hunt down some difficult bug someday. What do you think? |
@jamestalmage Oh ok. Then let's keep it internal like this for now until a need arises. |
@jamestalmage Can you add a short example on how to use this to https://github.com/sindresorhus/ava/blob/master/maintaining.md ? @vdemedes Thoughts? |
I did not have a need for something like that for now, but if you find it useful, why not. But still, I don't think it should be included on npm. Perhaps leave it as an open PR? |
@vdemedes It's currently not included in the npm package as it's not listed in the |
84c35ea
to
464656c
Compare
Oh wait, I have an idea. Why don't we use debug in AVA? It will allow for an extremely easy debugging and a simple way to enable it. Plus, we won't need to ship/include one more file.
And it's been more or less a standard way to enable logs for a certain module (check |
👍 |
That still requires forking a process. It doesn't capture everything sent via process.send. |
fork.on('message', function (message) {
// log message
}); ? |
It will capture everything that a forked process sends via |
Did somebody force push to master? |
Nope, but somehow |
Anyway, I think this PR should be closed in favor of using |
document debug script
464656c
to
70348aa
Compare
Closing in favor of #242. |
Launches a single test in the same process
Logs what would be sent to the parent process (in magenta!).
Makes sure the
ava-cleanup
method gets called on exit (so you can verify unhandled rejections).