Change @isTestGroup to @isTest on testGoldens #140
Merged
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
testGoldens
function currently has an@isTestGroup
annotation, 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
@isTest
fixes this, and everything works as expected.Related PRs/commits: