Test Error: Unhandled promise rejection when loading custom-app-header.component.html undefined. #3146
-
I updated angular version 8 to 12. Now, most of the unit tests are breaking with the error above.
jest.config.js file
app.component.spec.ts
But there is no named file custom-app-header.component.html or app-header.component.scss in the project. In SharedModule, we are using a custom library that was made as a local npm package. And importing all of them in SharedModule. sharedModule.ts file
It's working well in Angular8 and jest-preset-angular 7.0. but not in angular 12. I believe this can be solved through the ts-jest module. Can anyone please advise me? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can follow the configuration at https://github.com/thymikee/jest-preset-angular/tree/main/examples/example-app-v12 |
Beta Was this translation helpful? Give feedback.
You can follow the configuration at https://github.com/thymikee/jest-preset-angular/tree/main/examples/example-app-v12