-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
"TypeError: matcherResult.message is not a function" after upgrade jest to latest version (27.0.3) #39
Comments
i'm published package @alex_neo/jest-expect-message setupFilesAfterEnv: ['@alex_neo/jest-expect-message'], |
downgrading to jest@26.6.3 fixes the issue for now |
I am also getting this message on Jest 27.1.0. |
|
issue with new jest jestjs/jest#11698 DefinitelyTyped/DefinitelyTyped#55803 https://github.com/mattphillips/jest-expect-message hasn't been updated in 2+ years so taking https://github.com/mattphillips/jest-expect-message/pull/40/files to fix mattphillips/jest-expect-message#39 mattphillips/jest-expect-message#39 (comment)
issue with new jest jestjs/jest#11698 DefinitelyTyped/DefinitelyTyped#55803 https://github.com/mattphillips/jest-expect-message hasn't been updated in 2+ years so taking https://github.com/mattphillips/jest-expect-message/pull/40/files to fix mattphillips/jest-expect-message#39 mattphillips/jest-expect-message#39 (comment)
I've been puzzled by this since upgrading to |
The combination of: * jest 27 * ts-jest * jest-expect-message Leads to any test that wants to report an error message failing with the error: ``` TypeError: matcherResult.message is not a function ``` (ref: mattphillips/jest-expect-message#39) The result is that the actual error is swallowed, and this is very unhelpful. Since we only used to use `jest-expect-message` in one place anyway, remove it.
The combination of: * jest 27 * ts-jest * jest-expect-message Leads to any test that wants to report an error message failing with the error: ``` TypeError: matcherResult.message is not a function ``` (ref: mattphillips/jest-expect-message#39) The result is that the actual error is swallowed, and this is very unhelpful. Since we only used to use `jest-expect-message` in one place anyway, remove it. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
@alexneo2003 can you please contribute your code to the main package here? @mattphillips are you looking into this problem? |
Check this comment |
The PR is open for like 4 months: #40 |
still getting the issue |
try modified package setupFilesAfterEnv: ['@alex_neo/jest-expect-message'], |
Blatantly stolen from mattphillips#40
Hi, First Thanks for the Job 👍 , but seems that this version is not publish on npm (I'm maybe wrong), in case I'm right would it be possible to publish the last version ? Thanks! |
try modified package setupFilesAfterEnv: ['@alex_neo/jest-expect-message'], |
Yep works, is this project dead ? Thanks ! |
rather yes than no
rather yes than no |
modified package setupFilesAfterEnv: ['@alex_neo/jest-expect-message'], |
Sorry for the delay in coming to this!!! I've just published a new version with the fix for this in: https://www.npmjs.com/package/jest-expect-message/v/1.0.4 |
Better a year late than never! Thank you. 🙂 |
Bug
"TypeError: matcherResult.message is not a function" exception after upgrade jest to latest version (27.0.3)
npx envinfo --preset jest
System:
OS: Windows 10 10.0.19043
CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
Binaries:
Node: 14.16.0
Yarn: 1.22.5
npm: 6.14.11
npmPackages:
jest: ^27.0.3 => 27.0.3
jest-expect-message: 1.0.2
Relevant code or config
What you did:
upgrade jest to latest version 27.0.3
What happened (please provide anything you think will help):
when expect was failed instead receive custom message with error text i'm receive exception:
Reproduction repository (if possible):
yarn install jest@27.0.3
The text was updated successfully, but these errors were encountered: