-
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
fix(valid-describe): add check for empty arguments #94
Conversation
@@ -11,6 +11,7 @@ const ruleTester = new RuleTester({ | |||
|
|||
ruleTester.run('valid-describe', rule, { | |||
valid: [ | |||
'describe()', |
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.
An empty describe
isn't valid - could you make it be a linting error instead?
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.
just a
if (node.arguments.length < 2) {
context.report({
message: '`describe` requires 2 arguments',
loc: paramsLocation(node.arguments),
});
return;
}
or something similar
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.
See inline comment
🎉 This PR is included in version 21.14.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@SimenB Sorry about that, ended up rather busy. Thanks for following through! |
No worries 🙂 Seemed like a pretty critical error to land, and your PR was basically there |
This PR fixes #93.