Enforce valid describe() callback (valid-describe-callback)
julianCast opened this issue · 4 comments
julianCast commented
Current behavior
According to Cypress doc docs.cypress.io/guides/guides/test-retries#Test-Suites we can pass a object as second parameter to Describe, for example to use retries.
According to jest we shouldn't jest-community/eslint-plugin-jest@v28.6.0/docs/rules/valid-describe-callback.md
Desired behavior
Not getting a ESlint error from eslint-plugin-jest
Test code to reproduce
describe(
"Test1",
{
retries: {
runMode: 2,
openMode: 1,
},
},
() => {})
Cypress Version
13.13.2
Node version
20
Operating System
macOS
MikeMcC399 commented
- As commented in cypress-io/cypress#30092 this is not the right place for issues using https://github.com/jest-community/eslint-plugin-jest
- If you are using Jest and Cypress in the same repo, then you should avoid linting your Cypress test specs with Jest and lint them with the Cypress linter instead.
MikeMcC399 commented
Your test code fails linting since it should have a round closing bracket.
describe(
"Test1",
{
retries: {
runMode: 2,
openMode: 1,
},
},
() => {}}
9:11 error Parsing error: Unexpected token }
✖ 1 problem (1 error, 0 warnings)
Once this error is corrected it passes linting with eslint-plugin-cypress
.
MikeMcC399 commented
Closing, as there is no issue with eslint-plugin-cypress
.
julianCast commented
Thank you, I will try with eslint-plugin-cypress