-
Notifications
You must be signed in to change notification settings - Fork 218
Should two tests with the same name be an error? #661
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
Comments
There are a number of issues with this. Maybe the biggest problem, though, is that this would be a breaking change and we try hard to avoid those in Hopefully when #48 lands it'll be pretty easy to add some sort of linter for this for users who want this restriction. |
Okay, thanks! Just to clarify, I think the Flutter team would only be concerned about uniqueness within a single test file. That is, (filename, test name) could serve as a unique id, since in IDEA, we'd only use this to run tests within one file at a time. |
I can definitely see how that would make sense for their use-case! But from the perspective of |
In the Dart and (soon) Flutter plugins for IDEA, we use
--name
and--plain-name
to identify a test to run within a test file. Some folks on the Flutter team are concerned that users might accidentally write two tests with the same name. Couldpackage:test
check for this?Followup to discussion in:
flutter/flutter#11020
The text was updated successfully, but these errors were encountered: