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

feat(matcher): add toStrictEqual as equality matcher #412

Merged
merged 3 commits into from Sep 5, 2019
Merged

feat(matcher): add toStrictEqual as equality matcher #412

merged 3 commits into from Sep 5, 2019

Conversation

JrSchild
Copy link
Contributor

@JrSchild JrSchild commented Sep 5, 2019

This PR adds toStrictEqual as equality matcher. This fixes the following rules:

  • prefer-to-be-null
  • prefer-to-be-undefined
  • prefer-to-contain
  • prefer-to-have-length

The tests and documentation have also been updated.

@@ -341,6 +341,7 @@ export enum ModifierName {
enum EqualityMatcher {
toBe = 'toBe',
toEqual = 'toEqual',
toStrictEqual = 'toStrictEqual',
Copy link
Member

Choose a reason for hiding this comment

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

hah, only code change. awesome, thanks for verifying by adding some tests, though!

Copy link
Collaborator

@G-Rath G-Rath Sep 5, 2019

Choose a reason for hiding this comment

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

Well, that's one question I can cross off my list 😂

I had this pegged to ask about at some point, but never got around to it.
Cheers to all for wrapping up this loose end :)

@SimenB SimenB merged commit eacb78a into jest-community:master Sep 5, 2019
@JrSchild JrSchild deleted the feature/strict-equality-matcher branch September 5, 2019 14:21
@SimenB
Copy link
Member

SimenB commented Sep 5, 2019

🎉 This PR is included in version 22.17.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@SimenB SimenB added the released label Sep 5, 2019
@JrSchild
Copy link
Contributor Author

JrSchild commented Sep 5, 2019

Thanks @SimenB!

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

Successfully merging this pull request may close these issues.

None yet

3 participants