-
Notifications
You must be signed in to change notification settings - Fork 309
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
[Bug]: 14.2.1 test fails now with error ReferenceError: ServerError is not defined #2641
Comments
Hi, may I have a repo for this? |
never mind. just found a fix. The interface |
hmm weird, are you using |
@ahnpnl no; not using that; should we?
I am not really experienced with this all so trying to figure out how I isolated it in something I can share. |
https://github.com/thymikee/jest-preset-angular/tree/main/examples you can try using the example apps here to add your problem |
@ahnpnl I made a fork and added the code directly; Also had to install @angular/material |
Thanks that would help a lot 🙏 |
@ahnpnl do you need it in a PR or something or is it fine this way? |
oh a fork is fine for me 👍 |
Instead of putting the interface to another file, you can put it above the class. It seems like the transformed codes are not happy when we put interface/type after usage. This issue has been there even before 14.2.0 |
hmm right, I think something has changed from Angular side. I need to check a bit further |
Another workaround you can try is switch to use |
should be fixed with 14.2.2. The build artifact in 14.2.1 wasn't correct which causes the issue |
@ahnpnl thank you! |
Version
14.2.1
Steps to reproduce
Have a very simple component in angular
and even more simple test
now when upgrading from
14.2.0
to14.2.1
the test breaks withReferenceError: ServerError is not defined
Expected behavior
I would expect upgrading from 14.2.0 to 14.2.1 wouldnt cause issues in this case and behavior stayed the same with 14.2.0
Actual behavior
getting an exception
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: