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

ng test - no source files in Chrome #6785

Closed
alastair-todd opened this issue Jun 23, 2017 · 6 comments · Fixed by #6862
Closed

ng test - no source files in Chrome #6785

alastair-todd opened this issue Jun 23, 2017 · 6 comments · Fixed by #6862
Assignees
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix

Comments

@alastair-todd
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.3
node: 6.9.4
os: win32 x64
@angular/animations: 4.2.4
@angular/common: 4.2.4
@angular/compiler: 4.2.4
@angular/core: 4.2.4
@angular/forms: 4.2.4
@angular/http: 4.2.4
@angular/platform-browser: 4.2.4
@angular/platform-browser-dynamic: 4.2.4
@angular/router: 4.2.4
@angular/cli: 1.1.3
@angular/compiler-cli: 4.2.4
@angular/language-service: 4.2.4

Repro steps.

run ng test

Desired functionality.

step through test code in chrome tools using the Karma DEBUG button

Mention any other details that might be useful.

There are no longer any source files, previously we had a webpack folder with all the source files.

This no longer exists.

@alastair-todd
Copy link
Author

alastair-todd commented Jun 26, 2017

OK the --sourcemap flag was added to ng test but doesn't seem to make a jot of difference? The webpack folder is there in the karma runner, but the source files are not. When clicking DEBUG button in the runner, the webpack folder is not there. You can add debugger calls and you end up in the bundles but that is a pain.

Why not --nosourcemap anyway and not break the original default behaviour?

@alastair-todd alastair-todd reopened this Jun 26, 2017
@filipesilva filipesilva self-assigned this Jun 26, 2017
@filipesilva filipesilva added P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful severity5: regression type: bug/fix labels Jun 26, 2017
@kpaxton
Copy link

kpaxton commented Jun 29, 2017

Also having this same issue. --sourcemap doesn't do anything and the sourcemaps when executing anng test command are not in the build at all.

@CodeAndWeb
Copy link

Same here. Getting complete useless call stacks from the tests. Can be reproduced using

ng new test

Add

expect(true).toBeFalsy();

to app.component.spec.ts

Run test

> ng test --sourcemaps
03 07 2017 09:08:50.443:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9876/
03 07 2017 09:08:50.444:INFO [launcher]: Launching browser Chrome with unlimited concurrency
03 07 2017 09:08:50.450:INFO [launcher]: Starting browser Chrome
03 07 2017 09:08:56.950:WARN [karma]: No captured browser, open http://localhost:9876/
03 07 2017 09:08:57.146:INFO [Chrome 59.0.3071 (Mac OS X 10.12.5)]: Connected on socket pH6eC5Jxj55VuuFtAAAA with id 376460
Chrome 59.0.3071 (Mac OS X 10.12.5) AppComponent should render title in a h1 tag FAILED
	Expected true to be falsy.
	    at Object.<anonymous> (http://localhost:9876/_karma_webpack_/main.bundle.js:96:22)
	    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)
Chrome 59.0.3071 (Mac OS X 10.12.5): Executed 3 of 3 (1 FAILED) (0 secs / 0.185 secs)
Chrome 59.0.3071 (Mac OS X 10.12.5) AppComponent should render title in a h1 tag FAILED
	Expected true to be falsy.
	    at Object.<anonymous> (http://localhost:9876/_karma_webpack_/main.bundle.js:96:22)
	    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)
Chrome 59.0.3071 (Mac OS X 10.12.5): Executed 3 of 3 (1 FAILED) (0.205 secs / 0.185 secs)

@filipesilva
Copy link
Contributor

Related to #6737, fixed by #6862.

@filipesilva
Copy link
Contributor

The source map tracing in console 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
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.

4 participants