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

Jasmine tests stacktrace useless - does not show source .ts files and line numbers #6943

Closed
xnnkmd opened this issue Jul 11, 2017 · 3 comments

Comments

@xnnkmd
Copy link

xnnkmd commented Jul 11, 2017

Bug Report or Feature Request (mark with an x)

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

Versions.

ng 1.2

Repro steps.

ng new tst

modify generated app.component.spec.ts line 23 to force an error. E.g.
expect(app.title).toEqual('forcebug');

ng test

Note the useless stacktrace this gives no clue about the source code responible for the bug.

The log given by the failure.

    Expected 'app' to equal 'forcebug'.
        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:2801: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)

C

Desired functionality.

Stacktrace should report app.component.ts:23 as part of the stacktrace (ideally at the top).

@devoto13
Copy link
Contributor

Possible duplicate of #6583.

@filipesilva
Copy link
Contributor

Closing as duplicate of #6583

@filipesilva filipesilva marked this as a duplicate of #6583 Jul 28, 2017
@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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants