-
Notifications
You must be signed in to change notification settings - Fork 233
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
feat(console): export helper to manually suppress error output #571
Conversation
}) | ||
|
||
test('should not patch console.error', () => { | ||
require('..') |
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.
This actually wasn't testing anything. Requiring in the test wouldn't register the beforeEach
and afterEach
so it must be done before the test executes. I discovered this because with the refactoring, this left a uncovered branch that is now covered.
Codecov Report
@@ Coverage Diff @@
## master #571 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 15 15
Lines 218 219 +1
Branches 31 29 -2
=========================================
+ Hits 218 219 +1
Continue to review full report at Codecov.
|
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.
Looks great, documentation is clear as well 👍🏼
🎉 This PR is included in version 5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What:
Add a helper to suppress the error output in the same way the automatic suppression does for users that can't use the automatic version.
Also extended the documentation around this feature to describe the requirements for automatic suppression and give instructions on how to do it manually.
Why:
#564
How:
extracted the logic from the
beforeEach
andafterEach
and exported them from all the modules.Checklist: