feat(@angular-devkit/build-angular): Switch to karma-coverage#17901
Conversation
7a20487 to
6de7228
Compare
feb9f02 to
a7fef26
Compare
|
Because the coverage test is run asynchronously in a "runaway" promise, I had to do two things here to make the tests work:
I'm not very satisfied with both approaches, but after discussing with @filipesilva I think this is the best compromise. |
| expect(result.success).toBeTrue(); | ||
| const karmaResults: TestResults = result.karmaResults as never; | ||
| // exitCode is non-zero because coverage failed | ||
| expect(karmaResults.exitCode).toBe(1); |
There was a problem hiding this comment.
With this change, it means that currently with the CLI, there is no way to exit the process with a non zero error code when code coverage threshold is not met.
alan-agius4
left a comment
There was a problem hiding this comment.
This looks great.
Left a couple of comments.
Also, currently code-coverage in the console we display a summary, however it seems that it doesn't work with the new plugin. Can you take a look?
TOTAL: 3 SUCCESS
TOTAL: 3 SUCCESS
TOTAL: 3 SUCCESS
=============================== Coverage summary ===============================
Statements : 88.89% ( 8/9 )
Branches : 100% ( 0/0 )
Functions : 100% ( 0/0 )
Lines : 85.71% ( 6/7 )
================================================================================
6077037 to
a33b3a5
Compare
|
Update: even though karma-coverage 2.0.3 was released to address the issue of
Since karma-coverage 2.0.3 no longer modifies the karma results in-place, the solution implemented in this PR is no longer applicable. |
|
@kyliau, any chance to get in touch with one of the Karma Googler’s to prioritise the above fixes? |
f69bef7 to
da462ea
Compare
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
@googlebot I consent |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
alan-agius4
left a comment
There was a problem hiding this comment.
LGTM, just one small NIT.
09ccaf4 to
4d89628
Compare
This commit switches coverage tooling from karma-coverage-istanbul-reporter to karma-coverage since it's better supported. Closes angular#17757
4d89628 to
b162679
Compare
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This commit switches coverage tooling from karma-coverage-istanbul-reporter
to karma-coverage since it's better supported.
Fixes #17757