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

fix: refactor stubConsole and restoreConsole methods in repo-tools with sinon dependency #1600

Merged
merged 7 commits into from
Feb 4, 2020

Conversation

sofisl
Copy link
Collaborator

@sofisl sofisl commented Feb 4, 2020

No description provided.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 4, 2020
Copy link
Contributor

@fhinkel fhinkel left a 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` &&
Copy link
Contributor

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?

Copy link
Collaborator Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants