Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(console): export helper to manually suppress error output #571

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

Merged
joshuaellis merged 5 commits into master from feat/error-output-helper
Mar 1, 2021

Conversation

Copy link
Member

@mpeyper mpeyper commented Mar 1, 2021

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 and afterEach and exported them from all the modules.

Checklist:

  • Documentation updated
  • Tests
  • Ready to be merged

})

test('should not patch console.error', () => {
require('..')
Copy link
Member Author

@mpeyper mpeyper Mar 1, 2021

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.

joshuaellis reacted with hooray emoji
Copy link

codecov bot commented Mar 1, 2021
edited
Loading

Codecov Report

Merging #571 (a2c10f9) into master (7f6e4bb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@
## master #571 +/- ##
=========================================
 Coverage 100.00% 100.00% 
=========================================
 Files 15 15 
 Lines 218 219 +1 
 Branches 31 29 -2 
=========================================
+ Hits 218 219 +1 
Impacted Files Coverage Δ
src/core/index.ts 100.00% <ø> (ø)
src/dom/pure.ts 100.00% <ø> (ø)
src/native/pure.ts 100.00% <ø> (ø)
src/server/pure.ts 100.00% <ø> (ø)
src/core/console.ts 100.00% <100.00%> (ø)
src/pure.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f6e4bb...63becef. Read the comment docs.

Copy link
Member

@joshuaellis joshuaellis left a 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 👍🏼

@joshuaellis joshuaellis merged commit d8dac20 into master Mar 1, 2021
Copy link

github-actions bot commented Mar 1, 2021

🎉 This PR is included in version 5.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@joshuaellis joshuaellis joshuaellis approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /