-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add rule no-sibling-hooks
(fixes #82)
#85
Conversation
6dfdb20
to
e26fd48
Compare
# Disallow hooks (no-hooks) | ||
|
||
Mocha proposes hooks that allow code to be run before or after every or all tests. This helps define a common setup or teardown process for every test. | ||
It is possible to declare a hook multiple times inside the same test suite, but it can confusing. It is better to have one hook handle the whole of the setup or teardown logic of the test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-but it can confusing
+but it can be confusing
Added support for those
Still TBD. I'd vote for no unless someone really wants it or it's properly handled with the other rules. If this is the only rule that will support it, I don't see the point. |
Actually, if we want to do that, we'd probably better update Or actually, we could probably do it by not reporting the variables that were declared in the file (using |
I would be ok with not supporting the TDD interface now. We can add support for it if somebody requests that. I think the right approach would be check where |
I'm fine with that. Then this PR is up for review |
LGTM |
Add rule
no-sibling-hooks
(fixes #82)Let me know if you want me to change something or if I've missed something :)
I deactivatd two rules here about the function complexity. I could not make the function less complex. I could move the last part of the function to another function, but I'm not sure it would make it less complex, as you'd pass a few arguments around. Not opposed to doing that though. Let me know what you wish for me to do.