Improve testing setup - snapshot testing for the formatter output, setup coverage for dev ux#203
Open
kevinramharak wants to merge 2 commits intoyoavbls:mainfrom
Open
Improve testing setup - snapshot testing for the formatter output, setup coverage for dev ux#203kevinramharak wants to merge 2 commits intoyoavbls:mainfrom
kevinramharak wants to merge 2 commits intoyoavbls:mainfrom
Conversation
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.
Inspired by #186, specifically this comment #186 (comment), I figured to take another shot at improving the test setup, to make it easier to merge PR's with more confidence.
Changes:
vitestto4.x.x, no breaking changes for our uses, but it does make setting up code coverage easier.@pretty-ts-errors/formatter, main reason I started this PR is to make changes to regexes with more confidence, as changes to the formatter output will break the tests, and require updating the snapshots explicitly. This should ensure changes in the output do not go unnoticed.@pretty-ts-errors/formatterand@pretty-ts-errors/vscode-formatter. So far no automation, nor will it be run in the CI, but when using vitest explorer it will give good (visual) feedback on what is and isn't covered by tests (screenshot below).