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

false positive with non mocha hook #296

Open
fgarcia opened this issue Sep 1, 2021 · 1 comment
Open

false positive with non mocha hook #296

fgarcia opened this issue Sep 1, 2021 · 1 comment

Comments

@fgarcia
Copy link

fgarcia commented Sep 1, 2021

I am getting false positives in the rule mocha/no-sibling-hooks when calling a function called setup. I don't think it is a Mocha hook, otherwise it would be nice being able to disable each hook individually.

My code base tests is full of setup functions. It is a convention to quickly locate how the main object under test is built and/or modify the base build.

@lo1tuma
Copy link
Owner

lo1tuma commented Sep 1, 2021

It is a mocha hook when using the TDD interface, you can read more about it in the official mocha docs.

However, I think it would be a good idea if we could specify the interface, so we only report problems on hooks matching the configured interface. I’ve already started some work on that, as part of a major refactoring of the whole codebase. I really hope to get this finished soon.

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

No branches or pull requests

2 participants