-
Notifications
You must be signed in to change notification settings - Fork 234
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
lowercase-name
rule ignoreTopLevelTest
option
#612
Comments
ignoreTopLevelTest
optionlowercase-name
rule ignoreTopLevelTest
option
I don't feel like this makes sense, as the whole idea behind However, |
I guess it depends on how you write you test "sentences". I typically test that a library's exports are exported as intended, with something like this: import { MyClass } from 'my-library';
test( 'MyClass is a function', () => {
expect( typeof MyClass ).toBe('function');
} ); Does that seem like a reasonable case to you? |
That makes sense, but I'm still lukewarm on adding a new option for this as I feel it leads to adding more options that are starting to miss the point of the rule. In your case, you can make
In the above, there isn't really a nice way to structure the title to have a lowercase name that reads correctly and doesn't require using a different structure to other tests for things like functions:
|
I'm going to close this off due to the reasons outlined in my previous comment. |
To complement the
ignoreTopLevelDescribe
option added in #611, would it be possible to also have anignoreTopLevelTest
option?I'd envisage it affecting both
it
andtest
- I doubt many people use bothit
andtest
in the same file, so it seems excessive to have separateignoreTopLevelTest
andignoreTopLevelIt
options.An additional option
ignoreTopLevel
could also set bothignoreTopLevelDescribe
andignoreTopLevelTest
.Does this sound like a feature you'd accept? If so, I'd be happy to do a PR based on #611.
The text was updated successfully, but these errors were encountered: