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

feat(rules): add expect-expect #133

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

deecewan
Copy link
Contributor

This rule solves a common pain point at our company (and in a few issues on the main jest repo). We want to ensure that no-one has forgotten to add assertions to their tests. The standard way to do this is to use expect.hasAssertions or expect.assertions.

However, I added this lint rule to our internal eslint plugin and thought maybe it'd be beneficial to a wider audience.

The only case this doesn't cover (as I can see) is if you throw inside your test. And, of course, if you use a non-expect-based assertion library.

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 61c2adf into jest-community:master Aug 9, 2018
@SimenB
Copy link
Member

SimenB commented Aug 9, 2018

🎉 This PR is included in version 21.19.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

2 participants