Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

No longer works with Jest 21+ #39

Closed
jamesmoss opened this issue Oct 19, 2017 · 2 comments
Closed

No longer works with Jest 21+ #39

jamesmoss opened this issue Oct 19, 2017 · 2 comments

Comments

@jamesmoss
Copy link

jamesmoss commented Oct 19, 2017

Jest recently made a change that requires all matchers to return a function that returns a message string rather than a string itself.

jestjs/jest#3921

Attempting to use this lib with a version of Jest >= 21 will give you something similar to the error below if any test that uses these matchers fails:

 FAIL  test/reducers/appReducer.test.js
  ● app reducer › should return the initial state

    TypeError: message is not a function

      at getMessage (node_modules/expect/build/index.js:106:16)
      at Object.throwingMatcher [as toEqualImmutable] (node_modules/expect/build/index.js:216:23)
      at Object.<anonymous> (test/reducers/appReducer.test.js:9:3)
@jamesmoss jamesmoss changed the title No longer works with Jest 20+ No longer works with Jest 21+ Oct 19, 2017
@unindented
Copy link
Owner

Fixed by @njlr.

@unindented
Copy link
Owner

v2.0.0 should be compatible with Jest >=21. Let me know how it works for you.

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

No branches or pull requests

2 participants