How to run test with duplicate name but in different describe() block? #7223
Unanswered
ManfredLange
asked this question in
Q&A
Replies: 2 comments 1 reply
-
I thought vitest/packages/runner/src/utils/collect.ts Lines 106 to 108 in f9a6284 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I thought so, too. I'll provide a repro repo as soon as I find the time, probably later this week. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure yet whether it is user misunderstanding, a missing feature, by design or a bug.
We have the following test suite (the actual names are irrelevant):
Some context: We often use a top level describe for a class, then one level down to group the tests for a particular method on that class.
What I'd like to know is this: How can I run one of the tests "it should work" without the other of the same name?
When I use something like this, with
<filename>
and<working-directory>
set to the correct values:then it executes both tests with name "it should work" as if the describe() blocks don't even exist.
When I try something like this:
it skips all tests in the file.
I had a look at the documentation here https://vitest.dev/config/#testnamepattern but found only an example for the simplest of cases.
Can someone assist with this by pointing me in the right direction, please?
Beta Was this translation helpful? Give feedback.
All reactions