-
-
Notifications
You must be signed in to change notification settings - Fork 177
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
expect matchers are not extended with jest #562
Comments
I'm going to guess that it's a difference between using ESM modules or not? |
Attached is a bare minimum project that is setup to use jest with ESM modules and shows the issue if you just do a 'yarn test' |
@NetanelBasal Were you able to reproduce with the zip I provided? |
Can you do it on stackblitz? |
Maybe? Not sure how that's easier than just using the zip I gave you. I set it up at https://angular-ivy-rtojsi.stackblitz.io but I have no idea how to run jest on stackblitz so not sure if it'll fail the same way or not. |
The issue is that |
v11.1.0 |
Thank you so much! |
Is this a regression?
Yes
Description
The custom matchers you've defined, like toHaveExactText, do not work with jest setups.
I'm 99% sure the issue is that there is no call to
expect.extend
as shown at https://jestjs.io/docs/expect#expectextendmatchers but I don't understand the setup enough to provide a PR for this fix.Please provide a link to a minimal reproduction of the bug
Just try to use one with a jest config and it'll fail.
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: