You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having this issue in a project generated with Angular 11 and updated to Angular 14, but I managed to reproduce it in a project generated with Angular 13 and updated to Angular 14.
I did my research before creating this bug report, but all I've tried did not work for me.
I tried changing the module in tsconfig to CommonJs, setting up ts-jest, changing transform setting in jest.config, and a number of different things I have found online.
I have not been able to find a solution that works to me. I've also followed this guide: https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/
I actually looked at that example before, but somehow missed that. My bad.
I added that to my jest.config and one test passes, but I have two more tests in which I import components from a library in which I get the following error: TypeError: Class extends value undefined is not a constructor or null
File is a .mjs file, and the exact line which gives the error is this: class DsAnimationFrameScheduler extends AsyncScheduler
In the test that passes, there are no components from this library
Very likely related to #1199
typescript 4.8 currently is a problem.
In your case, ng14 can be used with ts 4.7.
Downgrade and you should be fine for the moment.
Version
12.2.2
Steps to reproduce
I'm having this issue in a project generated with Angular 11 and updated to Angular 14, but I managed to reproduce it in a project generated with Angular 13 and updated to Angular 14.
I did my research before creating this bug report, but all I've tried did not work for me.
Expected behavior
Test should run
Actual behavior
Tests fail and this error is shown:
Additional context
I tried changing the module in tsconfig to CommonJs, setting up ts-jest, changing transform setting in jest.config, and a number of different things I have found online.
I have not been able to find a solution that works to me. I've also followed this guide: https://thymikee.github.io/jest-preset-angular/docs/guides/angular-13+/
Environment
The text was updated successfully, but these errors were encountered: