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

Compatibility with future jasmine versions #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sgravrock
Copy link

Prior to Jasmine 3.6, matchers that wanted to support custom equality testers had to accept them as an argument to the matcher factory and pass them to MatchersUtil#equals and MatchersUtil#contains. That's not required beginning with 3.6. It'll produce a deprecation warning in 3.99 and fail in 4.0. This PR updates jasmine-enzyme to be compatible with the planned changes in Jasmine 3.99 and 4.0, while maintaining compatibility with older versions.

Additional context:
https://jasmine.github.io/tutorials/upgrading_to_Jasmine_4.0#matchers-cet

I've tested this by running a usage of toHaveState that relies on custom equality testers against the following versions of the jasmine package:
3.5.0
github:jasmine/jasmine-npm#3.99
github:jasmine/jasmine-npm#4.0

@sgravrock sgravrock changed the title Compatibility with future jasmine-core versions Compatibility with future jasmine versions Oct 16, 2021
) => {
const customEqualityTesters =
Copy link
Author

Choose a reason for hiding this comment

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

This can be removed if compatibility with jasmine 3.5 and earlier is not wanted.

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.

None yet

1 participant