🙈 Fix coverage ignore statement for racey errors#448
Merged
Conversation
Contributor
Author
|
🤔 ...ignore statement not working? |
samarsault
pushed a commit
that referenced
this pull request
Mar 3, 2023
Bumps [tsd](https://github.com/SamVerschueren/tsd) from 0.19.0 to 0.19.1. - [Release notes](https://github.com/SamVerschueren/tsd/releases) - [Commits](tsdjs/tsd@v0.19.0...v0.19.1) --- updated-dependencies: - dependency-name: tsd dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this?
Unfortunately, while #408 appeared to address a race between browser and page error handling, there existed other codepaths that could also race in the same way for the same reason.
For this codepath, the code was formatted in a way where we were only ignoring line coverage. The function though, is still created and in certain circumstances may not be called (which was the original goal of this ignore statement).
This PR updates the formatting and ignore statement so the entire handler is ignored. I found this "missing" coverage by studying the coverage output and figuring out which functions were being hit the least. The crash handler was only hit once, but we explicitly test for it. However, I noticed the ignore statement there and also in the
closemethod in which it was ignoring. This tipped me off that the ignore statement in theclosemethod was in the wrong place, and subsequently the error handler in the crash handler was unnecessary.I don't know for sure if this will fix our flakey coverage, but I have a strong hunch it might.