Open bvandercar-vt opened 1 month ago
Can you share the docs of these APIs? And how should the rule behave with this API when there's a describe
with the same title?
Can you share the docs of these APIs? And how should the rule behave with this API when there's a
describe
with the same title?
https://docs.cypress.io/guides/core-concepts/writing-and-organizing-tests#Test-Structure
"The test interface, borrowed from Mocha, provides describe()
, context()
, it()
and specify()
."
"context()
is identical to describe()
and specify()
is identical to it(
), so choose whatever terminology works best for you."
And how should the rule behave with this API when there's a describe with the same title?
However it currently functions for describe
-- they should be handled as being exact same, totally interchangeable.
I've never heard and used these APIs. Let's see if other users bump into this issue.
However, considering the description, I feel describe
and it
should be favoured due to their widespread usage.
I've never heard and used these APIs
describe
andit
should be favoured due to their widespread usage
These are incredibly common tools. MochaJs has 7,700,000+ weekly downloads on npm . Per their GitHub readme, "Mocha is one of the most-depended-upon modules on npm"
Then Cypress, which uses Mocha and Mocha's test wrapper names, has 5,300,000+ weekly downloads on npm
I'm not talking about the libraries, I know them. I'm talking about the APIs context
and specify
Environment information
Rule name
noDuplicateTestHooks
Playground link
https://biomejs.dev/playground/?code=ZABlAHMAYwByAGkAYgBlACgAIgBPAHUAdABlAHIAIABUAGkAdABsAGUAIgAsACAAKAApACAAPQA%2BACAAewAKAAkAYgBlAGYAbwByAGUARQBhAGMAaAAoACgAKQAgAD0APgAgAHsAfQApADsACgAKAAkAYwBvAG4AdABlAHgAdAAoACIASQBuAG4AZQByACAAVABpAHQAbABlACAAMQAiACwAIAAoACkAIAA9AD4AIAB7AAoACQAJAGIAZQBmAG8AcgBlAEUAYQBjAGgAKAAoACkAIAA9AD4AIAB7AH0AKQA7AAoACgAJAAkAaQB0ACgAIgB0AGUAcwB0ACAAMQAiACwAIAAoACkAIAA9AD4AIAB7AH0AKQA7AAoACgAJAAkAaQB0ACgAIgB0AGUAcwB0ACAAMgAiACwAIAAoACkAIAA9AD4AIAB7AH0AKQA7AAoACQB9ACkAOwAKAAoACQBjAG8AbgB0AGUAeAB0ACgAIgBJAG4AbgBlAHIAIABUAGkAdABsAGUAIAAyACIALAAgACgAKQAgAD0APgAgAHsACgAJAAkAYgBlAGYAbwByAGUARQBhAGMAaAAoACgAKQAgAD0APgAgAHsAfQApADsACgAKAAkACQBpAHQAKAAiAHQAZQBzAHQAIAAxACIALAAgACgAKQAgAD0APgAgAHsAfQApADsACgAKAAkACQBpAHQAKAAiAHQAZQBzAHQAIAAyACIALAAgACgAKQAgAD0APgAgAHsAfQApADsACgAJAH0AKQA7AAoAfQApADsACgA%3D
Expected result
It should not throw an error.
If I change
context
todescribe
, there is no error. Biome should account forcontext
like it already does fordescribe
; they are one in the same.context
is used for Cypress testing, Mocha Testing, and likely others.Code of Conduct