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
feat(rules): Add no-empty-title rule #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Can you add it to the main readme? (Prettier handles the formatting in the table)
Also, CI is unhappy since we don't have 100% test coverage. Either add the test cases or delete the code if it doesn't actually do anything :)
@SimenB yes I can add to the |
@SimenB resolved your comments. Note the build is still failing, but it is also failing on Let me know when that gets resolved upstream and I'll merge that fix in here. Otherwise just let me know if you have any other comments to address! 👍 |
master is fixed, so a rebase/merge should do the trick 🙂 |
@SimenB resolved the typo, let me know if I need to fix anything else! |
Added a test for template literals - if CI is happy then I'm happy 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I pushed a failing test, could you fix it?
@SimenB yeah it wasn't handling template literals well. These cases weren't reporting: it(``, () => {});
it(`${someVar}`, () => {}); They are now though, so everything should work! Let me know if you need to me change anything else! |
@@ -218,6 +218,7 @@ module.exports = { | |||
getStringValue, | |||
isDescribe, | |||
isFunction, | |||
isTemplateLiteral, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops my bad!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
🎉 This PR is included in version 22.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
The rule doesn't seem to work. It needs to be added to |
Good point! |
Oops my bad! |
Fixed in 22.4.1, thanks for reporting @garyking! |
Was this rule removed at some point? I don't see it in the docs, nor in the file system and I'm not seeing reference to its removal. |
Merged into |
Thanks @SimenB |
Having an empty string as title is pretty useless. This adds a new rule to ensure that tests have real titles.
Resolves #226
The following patterns are considered warnings:
These patterns would not be considered warnings: