Skip to content
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

use process exit listener instead of process.exit() #224

Merged
merged 1 commit into from
Jan 23, 2015

Conversation

jquense
Copy link
Contributor

@jquense jquense commented Jan 23, 2015

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:

  • the tests with the globally installed jest-cli (0.2.1)
  • then 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 returns 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 the process.on('exit') listeners still fire.

Hope that helps, its nice to finally see some output on my tests :P

ensures that console.log is fully flushed on Windows before exiting
completely
@jeffmo
Copy link
Contributor

jeffmo commented Jan 23, 2015

Thanks!

jeffmo added a commit that referenced this pull request Jan 23, 2015
use process exit listener instead of process.exit()
@jeffmo jeffmo merged commit 9ff8238 into jestjs:master Jan 23, 2015
@jquense jquense deleted the fix-truncated-windows-output branch January 23, 2015 03:44
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants