Skip to content

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

Merged
SimenB merged 3 commits intojest-community:masterfrom
JrSchild:feature/strict-equality-matcher
Sep 5, 2019
Merged

feat(matcher): add toStrictEqual as equality matcher#412
SimenB merged 3 commits intojest-community:masterfrom
JrSchild:feature/strict-equality-matcher

Conversation

@JrSchild
Copy link
Copy Markdown
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.

enum EqualityMatcher {
toBe = 'toBe',
toEqual = 'toEqual',
toStrictEqual = 'toStrictEqual',
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

3 participants