cypress-io/eslint-plugin-cypress

Enforce valid describe() callback (valid-describe-callback)

julianCast opened this issue · 4 comments

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

@julianCast

@julianCast

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.

Closing, as there is no issue with eslint-plugin-cypress.

Thank you, I will try with eslint-plugin-cypress