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

Can I disable the Libraries output? #62

Open
Wittmaxi opened this issue Feb 6, 2021 · 3 comments
Open

Can I disable the Libraries output? #62

Wittmaxi opened this issue Feb 6, 2021 · 3 comments

Comments

@Wittmaxi
Copy link

Wittmaxi commented Feb 6, 2021

Summary

I am using this library to unit test my cloud functions, which (evidently ?) do not depend on ('firebase'), however, wherever I am using firestore-jest-mock, I get a console.info
image

Since my project is going to become much bigger, this would mean that I can not use the library as I need to keep the test-restuls as clean as possible! Looking into the code, I couldn't find an "easy toggle" to turn this output off. What can I do?

@Wittmaxi
Copy link
Author

Wittmaxi commented Feb 6, 2021

On my local machine, I have commented out the specific line of code which tries to mock firebase. However, this means my teammates have to be informed of that or find a solution of their own to counter the long test-outputs
image

@sbatson5
Copy link
Owner

sbatson5 commented Feb 7, 2021

Thanks for posting.

You can actually hide all console output by running jest with the --silent flag. I agree that the output is annoying, since it will show up in every module. I'll have to think of a way to disable it if you know you aren't using one of the libraries. The hope was that the warning could flag you as to why your tests might be failing, as the error it was giving before was too vague to debug (if firebase wasn't found but you did need it).

For the time being --silent should at least hide that output for you.

@Wittmaxi
Copy link
Author

Wittmaxi commented Feb 7, 2021

Thank you very much for the help, for now, muting the output (or enduring it, wherever it occurs) is good enough - but I can't wait for the new version of the library that implements a fix for this! ;-) And actually - if you have a plan for how you want the interface for that to look, I can most certainly Do it myself and send you a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants