Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

@angular/build:karma ignores overrides in karma.conf.js

Open
#30,956 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
angular, typescript

Research direction

Clone the linked karma-coverage reproduction and inspect app.ts and karma.conf.js, then run the listed ng test command to reproduce the coverage failure. Trace how @angular/build:karma handles the configuration and verify that the per-file coverage override is honored while the global threshold remains effective.

Written by the indexing model from the issue text.

Description

area: @angular/build devkit/build-angular:karma freq1: low severity3: broken type: bug/fix
Command

test

Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

No response

Description

Using the new @angular/build:karma builder, coverage overrides defined in the karma.conf.js are ignored.

Minimal Reproduction
  • clone https://github.com/fynnfeldpausch/karma-coverage
  • take a look at app.ts - there is an additional method
  • take a look at karma.conf.js and the defined coverage
    • global coverage is set to 80%
    • local coverage is set to 0% for app.ts
  • run ng test -- --no-watch --no-progress --browsers=ChromeHeadless --code-coverage
Exception or Error
Test run fails with coverage errors:


19 08 2025 15:57:46.079:ERROR [coverage]: Chrome Headless 139.0.0.0 (Mac OS 10.15.7): Coverage for statements (75%) does not meet per-file (/repro-app/src/app/app.ts)  threshold (80%)
19 08 2025 15:57:46.079:ERROR [coverage]: Chrome Headless 139.0.0.0 (Mac OS 10.15.7): Coverage for lines (66.66%) does not meet per-file (/repro-app/src/app/app.ts)  threshold (80%)
19 08 2025 15:57:46.079:ERROR [coverage]: Chrome Headless 139.0.0.0 (Mac OS 10.15.7): Coverage for functions (0%) does not meet per-file (/repro-app/src/app/app.ts)  threshold (80%)
Your Environment
_                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 20.1.6
Node: 24.2.0
Package Manager: npm 11.3.0
OS: darwin arm64

Angular: 20.1.7
... common, compiler, compiler-cli, core, forms
... platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2001.6
@angular-devkit/core         20.1.6
@angular-devkit/schematics   20.1.6
@angular/build               20.1.6
@angular/cli                 20.1.6
@schematics/angular          20.1.6
rxjs                         7.8.2
typescript                   5.8.3
zone.js                      0.15.1
Anything else relevant?

No response

Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
16h 35m
Merged PRs (30d)
176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from angular/angular-cli

All issues in angular/angular-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.