eslint-plugin-mocha is configured inconsistently in this repo regarding the rules:
mocha/no-exclusive-tests to warn about the use of describe.only, it.only, etc. - configured to error
mocha/no-skipped-tests to warn about the use of describe.skip, it.skip, etc. - configured per plugin:mocha/recommended for warn only (see Rules table) for this plugin.
Since it is undesirable to have .only or .skip in the example test specs, both should be configured to error on linting.
Issue
eslint-plugin-mocha is configured inconsistently in this repo regarding the rules:
describe.only
,it.only
, etc. - configured toerror
describe.skip
,it.skip
, etc. - configured perplugin:mocha/recommended
forwarn
only (see Rules table) for this plugin.Since it is undesirable to have
.only
or.skip
in the example test specs, both should be configured toerror
on linting.Change
Add mocha/no-skipped-tests
error
to the configuration in .eslintrc.Verification
Temporarily modify the file
cypress/e2e/2-advanced-examples/actions.cy.js
to add an exclusive test and a skipped test:context
tocontext.only
it
toit.skip
and execute:
confirm that linting errors (no warnings) are reported: