-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
--listTests should always print to stdout
#4388
Comments
I'd like to tackle this! |
@aaronabramov does the Because if we force both outputs to be printed to const outputStream = argv.json || argv.useStderr ? process.stderr : process.stdout; It also specifically has this comment: // If we output a JSON object, we can't write anything to stdout, since
// it'll break the JSON structure and it won't be valid. |
@jseminck yep! that's exactly what the bug is :)
so yes. both |
Thanks for the explanation! PR is up. 😄 Do we also need an additional test then to make sure |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
if we run jest with
--listTests --json
arguments the output will be printed tostderr
which is incorrect.We need to change these lines to use
console.log
https://github.com/facebook/jest/blob/master/packages/jest-cli/src/run_jest.js#L117-L122also this test needs to be fixed to use
stdout
https://github.com/facebook/jest/blob/master/integration_tests/__tests__/list_tests.test.js#L40-L42
The text was updated successfully, but these errors were encountered: