Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Karma esbuild builder stack trace sourcemap reference dist/test-out #29766

Open
1 task
cexbrayat opened this issue Mar 6, 2025 · 0 comments
Open
1 task

Karma esbuild builder stack trace sourcemap reference dist/test-out #29766

cexbrayat opened this issue Mar 6, 2025 · 0 comments

Comments

@cexbrayat
Copy link
Member

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

When using the @angular/build:karma builder, a test in error will show the following sourcemap:

at dist/test-out/29ed73c2-b781-409d-a89d-bfa4055a0227/src/app/app.component.spec.ts:20:23

instead of referencing src/app.component.spec.ts:17:34 which allows to click it and open it directly in the IDE.

Minimal Reproduction

Run:

npx @angular/[email protected] new karma-sourcemap --defaults --no-routing

Edit app.component.spec.ts to make a test fail and run ng test:

Chrome 133.0.0.0 (Mac OS 10.15.7) AppComponent should have the 'karma-sourcemap' title FAILED
        Expected 'karma-sourcemap' to equal 'other'.
            at <Jasmine>
            at UserContext.<anonymous> (dist/test-out/29ed73c2-b781-409d-a89d-bfa4055a0227/src/app/app.component.spec.ts:20:23)

Exception or Error


Your Environment

Angular CLI: 20.0.0-next.0
Node: 20.18.3
Package Manager: npm 10.9.0
OS: darwin arm64

Angular: 20.0.0-next.1
... common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.2000.0-next.0
@angular-devkit/core         20.0.0-next.0
@angular-devkit/schematics   20.0.0-next.0
@angular/build               20.0.0-next.0
@angular/cli                 20.0.0-next.0
@schematics/angular          20.0.0-next.0
rxjs                         7.8.2
typescript                   5.8.2
zone.js                      0.15.0

Anything else relevant?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants