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 positives for no-identical-title
rule
#340
Comments
Should check that eslint-plugin-jest/src/rules/tsUtils.ts Lines 249 to 261 in b27c80d
Wanna send a PR? |
@SimenB That's a much better solution 👍 Sure, I'd love to! |
Awesome! Should be enough to add the check to the |
Thinking about it, it's probably a somewhat expensive call, I'm not sure if we're able to cache it on a single file somehow? If not, might be best to just export a util we can call in rules that's e.g. |
@SimenB yes, also when thinking about it, verifying |
We also have A first go can of course limit this to the known members, which was the case previously. |
@SimenB Yeah you're right, we should add |
🎉 This issue has been resolved in version 22.13.5 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version 22.13.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The Problem
Given the following code (simplified version of the use-case):
We get the following error:
Why it Happened?
As part of #316 & #317 we now treat
test.<anything>()
as a test case. While only(test|it).skip
,(test|it).only
&(test|it).todo
are Jest valid options.In a project that works with
it
s anddescribe
s it's possible that a user will choose the nametest
for a utility object.(Sadly our case 🙈 )
While in our project we can change those object names, it will create a better developer experience if
eslint-plugin-jest
will avoid raising false-positive errors in this case.Proposed Solution
In the following context https://github.com/jest-community/eslint-plugin-jest/pull/317/files#diff-fecc1b14fa96780438948ea994aa4b29R123
Verify that the
node.callee.property.name
is one of the following:skip|only|todo
.The text was updated successfully, but these errors were encountered: