-
Notifications
You must be signed in to change notification settings - Fork 304
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverage report shows 0% while all tests passed. #611
Comments
Please see full discussion here kulshekhar/ts-jest#2090 :) |
Do you mean test finishes but not exits ? |
Yes, it runs all tests correctly and keeps hanging on app.component.spec.ts giving following error: TypeError: Converting circular structure to JSON |
I downgraded to jest: 25.5.4 and this solved TypeError: Converting circular structure to JSON
|
@ahnpnl I'm not allowed to share the repo but I can share the app.component.spec.ts ` describe('AppComponent', () => { beforeEach(() => {
}); beforeEach(async () => {
}); it('should create the app', () => { describe('ngOnInit', () => {
}); describe('IdleService', () => {
}); ` |
maybe you can try with 9.0.0-next.1 at |
馃悰 Bug Report
I'm unable to get a coverage report for my files. When I open the index.html file it's empty.
Can someone tell me what I'm doing wrong? I've setup everything as explained in the readme of Jest Preset Angular.
`
PASS src/app/pages/medication/subpages/week-view/week-view.component.spec.ts
PASS src/app/services/niss/niss.service.spec.ts
PASS src/app/pages/medication/subpages/day-view/day-view.component.spec.ts
PASS src/app/pages/medication/subpages/period-view/period-view.component.spec.ts
PASS src/app/services/user/user.service.spec.ts
PASS src/app/pages/valid-prescriptions/valid-prescriptions.component.spec.ts
PASS src/app/services/medication/medication.service.spec.ts
PASS src/app/ui-components/navigation-header/navigation-header.component.spec.ts
PASS src/app/pages/medication/medication.component.spec.ts
PASS src/app/pages/diary-notes/diary-notes.component.spec.ts
PASS src/app/pages/homepage/homepage.component.spec.ts
PASS src/app/pages/medication/subpages/complete-list/complete-list.component.spec.ts
PASS src/app/authentication/guards/auth.guard.spec.ts
PASS src/app/app.component.spec.ts
----------|---------|----------|---------|---------|-------------------
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
----------|---------|----------|---------|---------|-------------------
All files | 0 | 0 | 0 | 0 |
----------|---------|----------|---------|---------|-------------------
Test Suites: 14 passed, 14 total
Tests: 17 passed, 17 total
Snapshots: 0 total
Time: 8.489 s
Ran all test suites.
`
my config in package.json:
To Reproduce
Steps to reproduce the behavior:
jest --coverage
Expected behavior
Jest generating a report showing the coverage for all files.
envinfo
The text was updated successfully, but these errors were encountered: