cypress-io/eslint-plugin-cypress

Rule to enforce tags usage

Opened this issue · 2 comments

Would like to use a rule that enforce the usage of tags on each test, see:
https://www.npmjs.com/package/@cypress/grep#filter-with-tags

Ex. wrong code:

it('works as an array', () => {
  expect(true).to.be.true
})

Fixed code:

it('works as an array', { tags: ['config', 'some-other-tag'] }, () => {
  expect(true).to.be.true
})

@maiolica

I don't really understand why the code using tags is labeled as "wrong". It looks like you got this the wrong way around.

@maiolica

I don't really understand why the code using tags is labeled as "wrong". It looks like you got this the wrong way around.

Apologies, you are right, have fixed the code examples