Skip to content
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

Add new rule: require-tothrow-message #160

Merged
merged 3 commits into from Sep 29, 2018
Merged

Add new rule: require-tothrow-message #160

merged 3 commits into from Sep 29, 2018

Conversation

garyking
Copy link
Contributor

This closes #154.

This rule checks if toThrow or toThrowError has a message.


// Look for `toThrow` calls with no arguments.
if (
['toThrow', 'toThrowError'].indexOf(propertyName) > -1 &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use includes whenever we merge the next branch 🙂

Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SimenB SimenB merged commit 7515458 into jest-community:master Sep 29, 2018
@SimenB
Copy link
Member

SimenB commented Sep 29, 2018

🎉 This PR is included in version 21.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure toThrow always has a message
2 participants