Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upWarn about Test FW's '.only' calls #313
Comments
This comment has been minimized.
This comment has been minimized.
|
Thanks for opening this issue. I see why you would want to catch stray I'm not in favor of adding mocha-specific rules to There's already a project mocha-standard that might be open to the idea of extending standard and adding mocha-specific rules. Maybe you can try opening an issue there? |
feross
closed this
Oct 30, 2015
This comment has been minimized.
This comment has been minimized.
|
I understand completely, thanks for the quick reply and for pointing to those resources! |
taromero commentedOct 30, 2015
Just hit a case where I merged a test case forgetting to remove Mocha's
.onlyfrom one of the suites, resulting in CI nor running all of the tests before merging.The rule would look for either
describe.only,context.onlyorit.only.It would be nice to detect this. Let me know if it doesn't make much sense.
It seems like there's not an option on raw
eslint, but there's a plugin for this: https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/no-exclusive-tests.md.