jest-preset-angular Questions
3
Runing test I get this error
TypeError: Cannot read properties of undefined (reading 'ngModule')
I dont exactly know what is causing this error, but google said circular dependency issue but I am n...
Thirtytwo asked 6/4, 2022 at 16:44
1
Solved
Follow up on this solution
I've build a library with a component and a directive, which normally causes an import cycle.
Component
import { Component } from '@angular/core';
@Component({
selector...
Vacuous asked 12/4, 2023 at 21:11
5
Solved
After upgrading Angular to v 13 when I try to run my tests in the jest environment I have an error:
Cannot set base providers because it has already been called
import 'jest-preset-angular/setup-je...
Straka asked 8/11, 2021 at 11:13
1
I have an nx workspace that I am trying to move to jest. At first I got an error about PointerEvent not being defined. the proposed workaround for that was to do an Object.defineProperty(window, 'P...
Wore asked 10/4, 2021 at 17:38
2
Reading through this link i got to know that the equivalent of
and.callFake is mockImplementation and
and.returnValue is mockReturnValue.
Similarly is there an equivalent of and.callThrough() in...
Fairminded asked 7/1, 2018 at 14:0
2
I am testing an angular project with jest (using jest-preset-angular).
When collecting coverage, I get an uncovered branch and I don't understand why. I can reproduce the problem with 3 files.
so...
Aylesbury asked 15/8, 2019 at 21:13
1
© 2022 - 2024 — McMap. All rights reserved.