Change @isTestGroup to @isTest on testGoldens#140
Merged
coreysprague merged 1 commit intoeBay:masterfrom Jan 11, 2022
Merged
Conversation
This method represents a test, not a group of tests. This annotation is used by editors like VS Code to locate tests/groups and merges them with the test results in the tree. Using `isTestGroup` would cause the analysis-based test discovery to add a group with this name, whereas the test results would add a test with this name. Both should be the same.
Contributor
Author
|
I believe the bot failures are unrelated to this change. Some seem to be that |
Contributor
|
thanks @DanTup I just got back from vacation and am sifting through PRs. You are correct about the dart format. I'll get the CI up to snuff and get this merged. thanks for the contribution! |
Contributor
|
fix published in 0.13.0 |
Contributor
Author
|
Thanks! |
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.
The
testGoldensfunction currently has an@isTestGroupannotation, but the function just represents a test, not a group. It looks like it used to contain a group, but that was removed in favour of tags in f1d486c. This annotation appears to have been overlooked.With this set to group, the VS Code extension fails to merge the results from running the tests (where it gets a test with this name) and the analyzer discovery results (where it gets a group based on the annotation). The error has been fixed in Dart-Code/Dart-Code#3776, however even with that fix, the tree will now show both a test and a group with this name (since groups and tests are never merged together).
Changing the annotation to
@isTestfixes this, and everything works as expected.Related PRs/commits: