-
Notifications
You must be signed in to change notification settings - Fork 228
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
[new-rule] enforce describe blocks match module exports #675
Comments
I like it! but unfortunately I don't know if it's possible, since we can't parse other files with eslint - additionally we recommend using overrides to apply our rules to only test files which might affect things. In saying that, iirc When I have a chance I'll play around with some things, see if there's maybe some eslint utils that could be used. I definitely love the idea, so 🤞 it can be done! |
Cool! I thought you’d either love or hate the idea. Actually this is very similar to I believe their logic to process the referenced module is in |
I like to write my tests, so each
describe
block matches an export of the similar named module.For example, given the following module:
I would like to enforce the following layout for a test file:
I would like to propose a rule that verifies the name of a top-level describe block match the name of an export in the module with the same name, minus the
.test
/.spec
postfix.The text was updated successfully, but these errors were encountered: