-
-
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
Make console clearing with --watch optional #2959
Comments
In addition to this, (related because the problem I'm trying to solve would only apply to scenarios where the output needs to be logged out, not just viewed) it would be cool to make the interactive element ( |
You can use "CI=true jest --watch" which should work for this use-case. |
@cpojer Is there any documentation for this? I have just tried and it makes no difference for me... |
Can anyone provide any other insight on this issue? @cpojer's solution above didn't make any difference 😖 |
This will be resolved in the next release: #3078 |
@thymikee it will make it nicer too look at, but in a situation where it's not possible to interact at all (such as ci pipelines or, in my case, running inside docker), I was suggesting that this feature should be deactivated altogether. |
Can anyone provide any other insight on my original issue - stopping the console from being cleared? Running |
So currently there's no option to do that in watch mode, because of this line: https://github.com/facebook/jest/blob/v19.0.2/packages/jest-cli/src/watch.js#L101 Maybe we could make it configurable, what do you think @cpojer? |
I'm sorry, I meant to add some context but got side-tracked. I don't think at this point we'll be adding support for this feature, so I closed this issue. |
That's a shame. I can't use jest with my current stack because of this. 👎 Also note another person with the same issue: #3213 |
Hmm, that's not great. Maybe we should figure out what workaround might work for you. I'm a bit unsure why "CI=true jest --watch" didn't work. That may actually be a Jest bug, so I'm gonna reopen this issue but we'd appreciate PRs to fix this. |
Ah, that's brilliant! Last time I was deving into the code base I was a bit overwhelmed but I'll take another look this week and try to get a PR submitted. |
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. |
I am using
jest --watch
in a docker container, which runs alongside some other development services on docker (namely webpack). When the tests re run, the console gets cleared (I understand this is desired behavior). Problem is, that gets rid of the logs from my other services. I really think that clearing the console should be optional, perhaps via an opt-out flag (jest --watch --no-clear
or something).The text was updated successfully, but these errors were encountered: