-
Notifications
You must be signed in to change notification settings - Fork 2k
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
fix: refactor stubConsole and restoreConsole methods in repo-tools with sinon dependency #1600
fix: refactor stubConsole and restoreConsole methods in repo-tools with sinon dependency #1600
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Maybe we can do a second refactoring after landing this where we simplify the sinon
calls.
sinon.stub(console, `error`); | ||
sinon.stub(console, `log`).callsFake((a, b) => { | ||
if ( | ||
typeof a === `string` && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would the tests pass without this if clause?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately not (at least for this very specific one). I tried with other ones and they also failed, but definitely interested in making it simpler!
…tubRestoreConsole
…ocs-samples into removeStubRestoreConsole
No description provided.