Skip to content

ng test: Source maps don't match when using --code-coverage #19084

Closed
@daelmaak

Description

@daelmaak

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Not sure.

Description

When running ng test --code-coverage and then debugging in chrome, the source maps don't match the actual code. On picture, the execution should have stopped at debugger;, which it seemingly doesn't:

Screenshot from 2020-10-15 10-46-33

🔬 Minimal Reproduction

Using ng cli 10.1.5

  1. ng new
  2. in the newly created project, run ng test --code-coverage
  3. open source file of app.component.ts in the browser controlled by karma
  4. place some breakpoints and check whether it is was placed on correct line (which it won't)

🔥 Exception or Error

none

🌍 Your Environment


Angular CLI: 10.1.5
Node: 12.11.0
OS: linux x64

Angular: 10.1.5
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1001.4
@angular-devkit/build-angular   0.1001.5
@angular-devkit/core            10.1.5
@angular-devkit/schematics      10.1.5
@angular/cdk                    10.2.4
@angular/flex-layout            10.0.0-beta.32
@angular/material               10.2.4
@nguniversal/builders           10.1.0
@nguniversal/common             10.1.0
@nguniversal/express-engine     10.1.0
@schematics/angular             10.1.5
@schematics/update              0.1001.5
rxjs                            6.6.3
typescript                      3.9.7

Anything else relevant?
not to my knowledge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions