Ahn

Results 296 comments of Ahn

The file is here https://github.com/thymikee/jest-preset-angular/blob/main/src/config/setup-jest.ts i think this is an existing issue already as I saw this in the past as well. Idk what the problem can be tbh. I...

seem like this is the issue. It comes from `getTestBed`

I debugged and saw that the compiled output of `AppComponent` contains `undefined` as ctor parameter instead of referencing the `DemoService`, which causes the issue. The problem could be that TypeScript...

The bug should occur to Angular 11 too as we use the same transformer. One unknown thing is why Karma + Jasmine works. The most suspicious point would be module...

the only workaround is don't use import namespace for now but you should import directly from the file as well as avoiding barrel file because that won't work unfortunately. We...

It is `ts-jest` problem as well as architecture problem. The error is caused by downlevel ctor transformer that it can’t resolve the injected dependencies which it modifies wrongly the AST....

There is still one more workaround is: use `ngc` to compile everything in your project and point Jest to run on the output folder, similar to the approach of using...

You can configure where Jest should look for the files by using `testMatch`, `testRegex`, `rootDir`. I think mainly `rootDir`, see https://jestjs.io/docs/configuration#rootdir-string You have to use `ngc` to compile, don’t use...

`ngc` can be configured but you would need to find documentation online.