René's URL Explorer Experiment


Title: [ng test] When code-coverage is on, sourcemaps for non spec files show JS content instead of TS · Issue #7117 · angular/angular-cli · GitHub

Open Graph Title: [ng test] When code-coverage is on, sourcemaps for non spec files show JS content instead of TS · Issue #7117 · angular/angular-cli

X Title: [ng test] When code-coverage is on, sourcemaps for non spec files show JS content instead of TS · Issue #7117 · angular/angular-cli

Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.2.3 node: 8.1.4 os: darwin x64 @angular/animations: 4.3.1 @angular/common: 4.3.1 @a...

Open Graph Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.2.3 node: 8.1.4 os: darwin x64 @angular/ani...

X Description: Bug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.2.3 node: 8.1.4 os: darwin x64 @angular/...

Opengraph URL: https://github.com/angular/angular-cli/issues/7117

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ng test] When code-coverage is on, sourcemaps for non spec files show JS content instead of TS","articleBody":"\u003c!--\r\nIF YOU DON'T FILL OUT THE FOLLOWING INFORMATION YOUR ISSUE MIGHT BE CLOSED WITHOUT INVESTIGATING\r\n-->\r\n### Bug Report or Feature Request (mark with an `x`)\r\n```\r\n- [x] bug report -> please search issues before submitting\r\n- [ ] feature request\r\n```\r\n\r\n### Versions.\r\n\u003c!--\r\nOutput from: `ng --version`.\r\nIf nothing, output from: `node --version` and `npm --version`.\r\n  Windows (7/8/10). Linux (incl. distribution). macOS (El Capitan? Sierra?)\r\n-->\r\n\r\n```\r\n@angular/cli: 1.2.3\r\nnode: 8.1.4\r\nos: darwin x64\r\n@angular/animations: 4.3.1\r\n@angular/common: 4.3.1\r\n@angular/compiler: 4.3.1\r\n@angular/core: 4.3.1\r\n@angular/forms: 4.3.1\r\n@angular/http: 4.3.1\r\n@angular/platform-browser: 4.3.1\r\n@angular/platform-browser-dynamic: 4.3.1\r\n@angular/router: 4.3.1\r\n@angular/cli: 1.2.3\r\n@angular/compiler-cli: 4.3.1\r\n@angular/language-service: 4.3.1\r\n```\r\n\r\n(Also tested on Windows 8.1 with Node 6)\r\n\r\n### Repro steps.\r\n\u003c!--\r\nSimple steps to reproduce this bug.\r\nPlease include: commands run, packages added, related code changes.\r\nA link to a sample repo would help too.\r\n-->\r\n\r\n```\r\nng new test-app\r\ncd test-app\r\n```\r\n\r\nGo to `app.component.ts`, and a constructor that looks like:\r\n\r\n```typescript\r\n  constructor() {\r\n    debugger;\r\n  }\r\n```\r\n\r\nThen run `ng test --sourcemap`\r\n\r\nSwitch to Chrome test browser, click \"Debug\", open the devtools, refresh.\r\n\r\nObserve how the breakpoint shows right (you see the `class` that is `AppComponent`)\r\n\r\n![image](https://user-images.githubusercontent.com/171637/28520464-e53d030a-70b2-11e7-8509-830a97274bcc.png)\r\n\r\nNow, stop the test runner, and re-run the command adding `--code-coverage` to it.\r\nLike `ng test --sourcemap --code-coverage`\r\n\r\nAgain, switch to Chrome test browser, click \"Debug\", open the devtools, refresh.\r\n\r\nObserve how the breakpoint shows differently this time:\r\n\r\n(shown in the next section)\r\n\r\n### The log given by the failure.\r\n\u003c!-- Normally this include a stack trace and some more information. -->\r\n\r\nIn the test browser devtools, we see compiled JavaScript as the content of the TypeScript file, like:\r\n\r\n![image](https://user-images.githubusercontent.com/171637/28520614-8f6279fa-70b3-11e7-80e3-f60e3dff0482.png)\r\n\r\n\r\n### Desired functionality.\r\n\u003c!--\r\nWhat would like to see implemented?\r\nWhat is the usecase?\r\n-->\r\n\r\nI'd like to be able to see the correct content of the files in sourcemaps, that is the TypeScript code, not the JavaScript code. Similar to the first screenshot when not using `--code-coverage`. I'd like `--code-coverage` to not cause this to break.\r\n\r\n### Mention any other details that might be useful.\r\n\u003c!-- Please include a link to the repo if this is related to an OSS project. -->\r\n\r\n- Note how the filename at the top of the source file tab and the sourcemaps comment at the end of the file content point to the TypeScript file not the JavaScript file!!\r\n  There are 2 sourcemaps comments in the file though, and only happening in the file where the result is wrong.\r\n\r\n- This problem does NOT happen in the spec files!!\r\n  I confirmed by adding `: AppComponent` to one of the tests. It's preserved (plus lambdas etc)\r\n  ![image](https://user-images.githubusercontent.com/171637/28520888-ad926fa6-70b4-11e7-9314-f24a7697ff35.png)\r\n\r\n- This was working in CLI 1.0.6 (the one that a project I was helping upgrade happened to be upgrading from, signaling the issue, not sure about other versions)","author":{"url":"https://github.com/Meligy","@type":"Person","name":"Meligy"},"datePublished":"2017-07-24T11:15:38Z","url":"https://github.com/angular/angular-cli/issues/7117"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:8674b1e3-1679-207e-d475-aa623cfb0164
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA0B2:2679E9:2A9B508:38E19E3:6B01C7E1
html-safe-nonce9b7f04a4222ccaaa6337b9c3afd9326ea61143a3302850b5dd059a5488785ecf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMEIyOjI2NzlFOToyQTlCNTA4OjM4RTE5RTM6NkIwMUM3RTEiLCJ2aXNpdG9yX2lkIjoiNjQ5Mzc4ODQ5NjYxMDgzODQ5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac89cd0c0e7795256d3136699a54fc16423ba293f877ae67f756f3453bd03ad90f
hovercard-subject-tagissue:245047696
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular-cli/7117/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d5818be98fa3bf30e94a95bb57b0c36c5b9d2bfd761dce114d1a0dc7068364f2/angular/angular-cli/issues/7117
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d5818be98fa3bf30e94a95bb57b0c36c5b9d2bfd761dce114d1a0dc7068364f2/angular/angular-cli/issues/7117
og:image:altBug Report or Feature Request (mark with an x) - [x] bug report -> please search issues before submitting - [ ] feature request Versions. @angular/cli: 1.2.3 node: 8.1.4 os: darwin x64 @angular/ani...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameMeligy
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular-cli git https://github.com/angular/angular-cli.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id36891867
octolytics-dimension-repository_nwoangular/angular-cli
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36891867
octolytics-dimension-repository_network_root_nwoangular/angular-cli
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular-cli/issues/7117#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F7117
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular-cli%2Fissues%2F7117
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular-cli
Reloadhttps://github.com/angular/angular-cli/issues/7117
Reloadhttps://github.com/angular/angular-cli/issues/7117
Reloadhttps://github.com/angular/angular-cli/issues/7117
angularhttps://github.com/angular
angular-clihttps://github.com/angular/angular-cli
Codehttps://github.com/angular/angular-cli
Issues198 (198)https://github.com/angular/angular-cli/issues
Pull requests23 (23)https://github.com/angular/angular-cli/pulls
Actionshttps://github.com/angular/angular-cli/actions
Security and quality8 (8)https://github.com/angular/angular-cli/security
Insightshttps://github.com/angular/angular-cli/insights
https://github.com/angular/angular-cli
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/7117
New issuehttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/7117
#16608https://github.com/angular/angular-cli/pull/16608
[ng test] When code-coverage is on, sourcemaps for non spec files show JS content instead of TShttps://github.com/angular/angular-cli/issues/7117#top
#16608https://github.com/angular/angular-cli/pull/16608
https://github.com/alan-agius4
area: @angular-devkit/build-angularhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular-devkit%2Fbuild-angular%22
freq2: mediumhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
severity2: inconvenienthttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity2%3A%20inconvenient%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
Backloghttps://github.com/angular/angular-cli/milestone/12
https://github.com/Meligy
Meligyhttps://github.com/Meligy
on Jul 24, 2017https://github.com/angular/angular-cli/issues/7117#issue-245047696
https://user-images.githubusercontent.com/171637/28520464-e53d030a-70b2-11e7-8509-830a97274bcc.png
https://user-images.githubusercontent.com/171637/28520614-8f6279fa-70b3-11e7-80e3-f60e3dff0482.png
https://user-images.githubusercontent.com/171637/28520888-ad926fa6-70b4-11e7-9314-f24a7697ff35.png
Nexthttps://github.com/angular/angular-cli/issues/7117?timeline_page=1
Meligyhttps://github.com/Meligy
on Jul 24, 2017https://github.com/angular/angular-cli/issues/7117#event-1175924586
Meligyhttps://github.com/Meligy
on Jul 24, 2017https://github.com/angular/angular-cli/issues/7117#event-1175924812
Meligyhttps://github.com/Meligy
on Jul 25, 2017https://github.com/angular/angular-cli/issues/7117#event-1177261942
Meligyhttps://github.com/Meligy
on Jul 25, 2017https://github.com/angular/angular-cli/issues/7117#event-1177262858
https://github.com/Meligy
Meligyhttps://github.com/Meligy
on Jul 25, 2017https://github.com/angular/angular-cli/issues/7117#issuecomment-317717116
https://github.com/Meligy
Meligyhttps://github.com/Meligy
on Jul 28, 2017https://github.com/angular/angular-cli/issues/7117#issuecomment-318559126
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Jul 28, 2017https://github.com/angular/angular-cli/issues/7117#issuecomment-318608982
@Meligyhttps://github.com/Meligy
filipesilvahttps://github.com/filipesilva
on Jul 28, 2017https://github.com/angular/angular-cli/issues/7117#event-1183228364
filipesilvahttps://github.com/filipesilva
command: testhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22command%3A%20test%22
freq2: mediumhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfulhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22P1%22
severity5: regressionhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity5%3A%20regression%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
on Jul 28, 2017https://github.com/angular/angular-cli/issues/7117#event-1183229507
https://github.com/filipesilva
filipesilvahttps://github.com/filipesilva
on Aug 4, 2017https://github.com/angular/angular-cli/issues/7117#issuecomment-320260215
filipesilvahttps://github.com/filipesilva
help wantedLabel noting an issue which the team is looking for contribution from the community to fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22help%20wanted%22
on Aug 4, 2017https://github.com/angular/angular-cli/issues/7117#event-1193232025
https://github.com/Meligy
Meligyhttps://github.com/Meligy
on Oct 4, 2018https://github.com/angular/angular-cli/issues/7117#issuecomment-426860255
@escalonnhttps://github.com/escalonn
@hanslhttps://github.com/hansl
https://github.com/escalonn
escalonnhttps://github.com/escalonn
on Oct 6, 2018https://github.com/angular/angular-cli/issues/7117#issuecomment-427535609
https://github.com/arobinson
arobinsonhttps://github.com/arobinson
on Jul 12, 2019https://github.com/angular/angular-cli/issues/7117#issuecomment-511061782
janschultehttps://github.com/janschulte
on Dec 19, 2019https://github.com/angular/angular-cli/issues/7117#event-2896743896
remove coverage check, because of following problem: angular/angular-…https://github.com/52North/helgoland-toolbox/commit/5b6b4e228bf2c63803803fed0fe062bb2168aa2e
angular/angular-…https://github.com/angular/angular-cli/issues/7117
5b6b4e2https://github.com/52North/helgoland-toolbox/commit/5b6b4e228bf2c63803803fed0fe062bb2168aa2e
alan-agius4https://github.com/alan-agius4
state: blockedhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22state%3A%20blocked%22
on Jan 8, 2020https://github.com/angular/angular-cli/issues/7117#event-2932032023
alan-agius4https://github.com/alan-agius4
alan-agius4https://github.com/alan-agius4
hanslhttps://github.com/hansl
on Jan 9, 2020https://github.com/angular/angular-cli/issues/7117#event-2934175373
alan-agius4https://github.com/alan-agius4
state: blockedhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22state%3A%20blocked%22
on Jan 9, 2020https://github.com/angular/angular-cli/issues/7117#event-2934405057
mgechevhttps://github.com/mgechev
completedhttps://github.com/angular/angular-cli/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#16608https://github.com/angular/angular-cli/pull/16608
on Jan 9, 2020https://github.com/angular/angular-cli/issues/7117#event-2936251358
mgechevhttps://github.com/mgechev
on Jan 9, 2020https://github.com/angular/angular-cli/issues/7117#event-2936251486
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loa…https://github.com/angular/angular-cli/commit/653be114ca30c148b5280e21d5bbcf3b5ecbdeae
https://docs.github.com/articles/closing-issues-via-commit-messages
653be11https://github.com/angular/angular-cli/commit/653be114ca30c148b5280e21d5bbcf3b5ecbdeae
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loa…https://github.com/angular/angular-cli/commit/648e23a90b6d5efe1ebd726b90bebf4f3b15033e
https://docs.github.com/articles/closing-issues-via-commit-messages
648e23ahttps://github.com/angular/angular-cli/commit/648e23a90b6d5efe1ebd726b90bebf4f3b15033e
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loa…https://github.com/angular/angular-cli/commit/d88c5f81c778a84fdf6c90ea886df1bb2ed9b5d0
https://docs.github.com/articles/closing-issues-via-commit-messages
d88c5f8https://github.com/angular/angular-cli/commit/d88c5f81c778a84fdf6c90ea886df1bb2ed9b5d0
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Feb 9, 2020https://github.com/angular/angular-cli/issues/7117#issuecomment-583816916
automatic conversation locking policyhttps://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Feb 9, 2020https://github.com/angular/angular-cli/issues/7117#event-3020421009
mostafaibrhttps://github.com/mostafaibr
on May 29, 2026https://github.com/angular/angular-cli/issues/7117#event-26099606491
fix(@angular-devkit/build-angular): replace istanbul-instrumenter-loa…https://github.com/mostafaibr/angular-cli/commit/fc3949cd0b8715e71f979198356b3b98b348df12
https://docs.github.com/articles/closing-issues-via-commit-messages
fc3949chttps://github.com/mostafaibr/angular-cli/commit/fc3949cd0b8715e71f979198356b3b98b348df12
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular-cli/issues/7117
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular-cli/issues/7117
alan-agius4https://github.com/alan-agius4
area: @angular-devkit/build-angularhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22area%3A%20%40angular-devkit%2Fbuild-angular%22
freq2: mediumhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22freq2%3A%20medium%22
severity2: inconvenienthttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22severity2%3A%20inconvenient%22
type: bug/fixhttps://github.com/angular/angular-cli/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%2Ffix%22
BacklogNo due datehttps://github.com/angular/angular-cli/milestone/12
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.