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

feat: Add no-exclusive-tests rule #25

Closed
wants to merge 2 commits into from
Closed

Conversation

RoryH
Copy link

@RoryH RoryH commented Jul 23, 2019

Adds rule similar to other test frameworks to identify exclusive tests.

https://mochajs.org/#exclusive-tests

@jennifer-shehane jennifer-shehane requested a review from a team July 24, 2019 03:41
@jennifer-shehane
Copy link
Member

I like it.

Copy link
Contributor

@kuceb kuceb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RoryH Thanks this is great. I agree its definitely needed, but we should probably just use https://github.com/lo1tuma/eslint-plugin-mocha. There are other useful rules in there too like no-indentical-title and no-nested-tests (and we could mutate the error messages to say Cypress instead of mocha if we wanted).

We obviously wouldn't want to use it as a plugin however since users would have to install both plugins, which would be awful.

What do you think, would you find any of those other rules useful @RoryH?

lib/rules/no-exclusive-tests.js Outdated Show resolved Hide resolved
@RoryH
Copy link
Author

RoryH commented Jul 24, 2019

@bkucera I had considered possibly re-using eslint-plugin-mocha somehow but this is my first time diving into eslint plugins 🤓 . How do you see it working without adding it as an extra dependency, would it be transitive dependency of eslint-plugin-cypress?

@kuceb
Copy link
Contributor

kuceb commented Jul 24, 2019

@RoryH we add it as a dependency, but we require the rules directly, like they do in this file https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/index.js

@RoryH
Copy link
Author

RoryH commented Jul 24, 2019

I like it... If you guys are happy I'll close this PR and open a new one pulling in the rules from eslint-plugin-mocha module 👍

@kuceb
Copy link
Contributor

kuceb commented Jul 24, 2019

@RoryH sounds great

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

Successfully merging this pull request may close these issues.

None yet

3 participants