-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Addition: lowercase-name only for tests #76
Addition: lowercase-name only for tests #76
Comments
We could provide an option that allows for ignoring the check for {
"jest/lowercase-name": ["error", {
"ignore": ["describe"]
}]
} I'm also wondering if |
There's also advice like "don't start test descriptions with 'should'" and
similar things.
Idea: what if there's an option to provide a regex (or multiple) that can
be used to validate tests (and a similar option for describes)?
…On Mon, Feb 12, 2018, 7:32 PM Macklin Underdown ***@***.***> wrote:
We could provide an option that allows for ignoring the check for
describe().
{
"jest/lowercase-name": ["error", {
"ignore": ["describe"]
}]
}
I'm also wondering if lowercase-name should check describe() at all, or
if only checking it() and test() is more valuable. 🤔
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAChnaaCyhed2pPTzOwQ03Ce6ncUjYJNks5tUQJHgaJpZM4SDJrS>
.
|
I like the idea of a regex (and an |
This code introduced in #74 could be a starting point for introducing an eslint-plugin-jest/rules/no-hooks.js Lines 30 to 35 in 47eb6c2
|
I submitted a PR to add the |
maybe rename the rule to |
Renaming it is a breaking change... We have a few breaking changes lined up anyways, so not a blocker. Worth it, though? |
Unsure! could maybe duplicate it into the new name & deprecate old, if you want a smoother transition (but a bit more annoying to maintain) |
This should be covered by the new option, agreed @nevir? Might be worth opening up a new issues for renaming the option. My vote is for a new major once node 4 is EOL in April anyways 🙂 |
🎉 This issue has been resolved in version 21.15.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It'd be helpful to allow uppercase names for describes (e.g. subjects -
ClassName
, etc), while still enforcing lowercase test titlesThe text was updated successfully, but these errors were encountered: