This repository has been archived by the owner on Oct 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Proposal: Having two tests / suite with the same title should fail the tests #115
Labels
Comments
I love this idea! @mgold what do you think? |
Seems a little bit finicky to implement but we have precedent for failing obviously wrong test cases. OP seems to suggest checking siblings and parent-children only, which seems right to me. There's probably a legitimate use for sharing names among grandchildren. |
i would say not across cousins, but otherwise makes sense |
Yeah, I'm thinking this could be as simple as maintaining a |
Or making a set from a list and checking the lengths of each, although that wouldn't give you a good error message. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm proposing a breaking change, that would aim users to have a better test suite (or at least better documented in a way):
The reasoning is kind of the same as for #95. If I have two tests with the same title, I have probably copy-pasted a test without updating the title. Enforcing different titles for every test should help have more descriptive tests. For reference, In JS land, popular testing frameworks like Mocha and AVA have ESLint plugins with rules that detect identical titles for tests and test suites.
Let me know what you think :)
The text was updated successfully, but these errors were encountered: