use process exit listener instead of process.exit() #224
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an updated PR using the most recent jest bin from master (from #111), and proposed solution to #110. I do not have the foggiest notion on how to write a test for this, and couldn't find any bin tests anyway...
I have manually checked on Windows 8.1, using the getting started code as the test code and running:
0.2.1
)npm link
this branch and run the tests again.The problem is present in the most recent version of jest in my example test, and this change resolves it. The added
return
s prevent further code execution quite nicely it seems. In all most attempts to check it (--help
and missing local install), nothing past the return ran (I would hope not!), but theprocess.on('exit')
listeners still fire.Hope that helps, its nice to finally see some output on my tests :P