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

jest displays console output when --silent is combined with --verobse #4458

Closed
mshibl opened this issue Sep 10, 2017 · 3 comments · Fixed by #4505
Closed

jest displays console output when --silent is combined with --verobse #4458

mshibl opened this issue Sep 10, 2017 · 3 comments · Fixed by #4505

Comments

@mshibl
Copy link

mshibl commented Sep 10, 2017

Do you want to request a feature or report a bug?
Report a bug

What is the current behavior?
when running jest --silent --verbose console output is printed
however, when running jest --silent only console output is supressed

GitHub repository for to reproduce.
https://github.com/mshibl/jest-silent-issue

What is the expected behavior?
Prevent tests from printing messages through the console when using jest --silent --verbose

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.

jest: 21.0.2
yarn: 0.17.9
node: 8.4.0
@mshibl
Copy link
Author

mshibl commented Sep 11, 2017

well, I'm looking at packages/jest-cli/src/runJest.js now and it seems like this is by design. However, the docs state the following regarding the --verbose option:

Display individual test results with the test suite hierarchy.

Which led me to expect to only see the test "results" not the full console output. If this is indeed the desired behaviour then I will close this bug report.

@cpojer
Copy link
Member

cpojer commented Sep 11, 2017

I think you are right, --silent --verbose should hide consoles but print everything else. I think you can change it if you invert the verbose/silent checks here, or similar: https://github.com/facebook/jest/blob/master/packages/jest-runner/src/run_test.js#L80-L92

Do you mind sending a PR? :)

@github-actions
Copy link

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.
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 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants