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

Test source maps are not working #6737

Closed
danielsuter opened this issue Jun 19, 2017 · 7 comments · Fixed by #6862
Closed

Test source maps are not working #6737

danielsuter opened this issue Jun 19, 2017 · 7 comments · Fixed by #6862
Assignees
Labels
effort2: medium (days) freq2: medium P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix

Comments

@danielsuter
Copy link

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.1.2
node: 6.9.1
os: win32 x64

Repro steps.

  1. ng new source-maps
  2. Make a test failing (e.g. app.component.spec.ts expect a wrong title)
  3. npm test

The log given by the failure.

Chrome 58.0.3029 (Windows 10 0.0.0) AppComponent should have as title 'app' FAILED
        Expected 'app' to equal 'app2'.
            at Object.<anonymous> (http://localhost:9876/_karma_webpack_/main.bundle.js:89:27)
            at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/polyfills.bundle.js:2800:26)
            at AsyncTestZoneSpec.webpackJsonp.../../../../zone.js/dist/async-test.js.AsyncTestZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2643:39)
            at ProxyZoneSpec.webpackJsonp.../../../../zone.js/dist/proxy.js.ProxyZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/vendor.bundle.js:3406:39)
Chrome 58.0.3029 (Windows 10 0.0.0): Executed 2 of 3 (1 FAILED) (0 secs / 0.154 secs)
Chrome 58.0.3029 (Windows 10 0.0.0) AppComponent should have as title 'app' FAILED
        Expected 'app' to equal 'app2'.
            at Object.<anonymous> (http://localhost:9876/_karma_webpack_/main.bundle.js:89:27)
            at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (http://localhost:9876/_karma_webpack_/polyfills.bundle.js:2800:26)
            at AsyncTestZoneSpec.webpackJsonp.../../../../zone.js/dist/async-test.js.AsyncTestZoneSpec.onInvoke (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2643:39)
            at ProxyZoneSpec.webpackJsonp.../../../../zone.js/dist/proxy.js.ProxyZoneSpec.onInvoke (http://localhost:987Chrome 58.0.3029 (Windows 10 0.0.0): Executed 3 of 3 (1 FAILED) (0.204 secs / 0.191 secs)

Desired functionality.

The output should show the line number of the typescript file instead of the bundle.

@filipesilva
Copy link
Contributor

Thanks for reporting this issue. However, this issue is a duplicate of an existing issue #6623. Please subscribe to that issue for future updates.

@danielsuter
Copy link
Author

@filipesilva The other issue is closed and it's only stated that there's a problem when debugging through docker.
Imho this is not a duplicate or the other issue should be adjusted and reopened.

@filipesilva
Copy link
Contributor

The issue I linked wasn't about docker, it's mentioned in the last comment by another user and nowhere else.

@clydin's comment (#6623 (comment)) indicates what the problem was and provides a fix in #6682. It should be in the latest release.

When using the latest release do you still experience this problem?

@filipesilva filipesilva reopened this Jun 28, 2017
@filipesilva filipesilva self-assigned this Jun 28, 2017
@filipesilva filipesilva added the needs: more info Reporter must clarify the issue label Jun 28, 2017
@filipesilva
Copy link
Contributor

#6824 also reported the same in 1.1.3, will investigate.

@filipesilva filipesilva added effort2: medium (days) freq2: medium P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix and removed needs: more info Reporter must clarify the issue labels Jun 29, 2017
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Jul 2, 2017
@filipesilva
Copy link
Contributor

I pushed a fix in #6862 that addresses part of the issue, restoring source maps test runs in the sources window:

image

I'm not sure that the other part of it, the error shown by the Karma console, is fixable though. I don't think that error uses sourcemaps, since it's a zone error. I tried using the @angular/cli@1.0.0 and it didn't seem to work there either. If you have a version of the CLI that correctly shows that error, please let me know.

@filipesilva
Copy link
Contributor

filipesilva commented Jul 3, 2017

The console error is being tracked in #6583.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort2: medium (days) freq2: medium P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants