Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rule to enforce tags usage #227

Open
maiolica opened this issue Oct 1, 2024 · 2 comments
Open

Rule to enforce tags usage #227

maiolica opened this issue Oct 1, 2024 · 2 comments

Comments

@maiolica
Copy link

maiolica commented Oct 1, 2024

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
})
@MikeMcC399

This comment was marked as resolved.

@maiolica
Copy link
Author

maiolica commented Oct 1, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants