René's URL Explorer Experiment


Title: bug(testing) Unable to do async-initialization in beforeEach-hook · Issue #9815 · angular/angular · GitHub

Open Graph Title: bug(testing) Unable to do async-initialization in beforeEach-hook · Issue #9815 · angular/angular

X Title: bug(testing) Unable to do async-initialization in beforeEach-hook · Issue #9815 · angular/angular

Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question Current be...

Open Graph Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma...

X Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angula...

Opengraph URL: https://github.com/angular/angular/issues/9815

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"bug(testing) Unable to do async-initialization in beforeEach-hook","articleBody":"**I'm submitting a ...**  (check one with \"x\")\n\n```\n[x] bug report\n[ ] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\n\nIn my tests I use the beforeEach-Hook to create the component-fixture. This worked in the past but with the latest changes I'm unable to get that working again. Trying to do it like this:\n\n``` ts\n  beforeEach(async(inject([TestComponentBuilder, TaskService],\n    (_tcb:TestComponentBuilder, _taskService:TaskService) => {\n      return _tcb\n        .overrideDirective(TaskListComponent, RouterLinkWithHref, DummyRouterLink)\n        .overrideDirective(TaskItemComponent, RouterLinkWithHref, DummyRouterLink)\n        .createAsync(TaskListComponent)\n        .then(_fixture => {\n          fixture = _fixture;\n          console.log(\"fixture\", fixture);\n        });\n    })));\n```\n\ndoesn't wait for the component to be created (the fixture is printed but after the test fails)\n\nTrying to use (done) callback from jasmine also doesn't work. In this case the inject-function is not called/executed at all:\n\n``` ts\n  beforeEach((done) => {\n    inject([TestComponentBuilder, TaskService],\n      (_tcb:TestComponentBuilder, _taskService:TaskService) => {\n        taskService = _taskService;\n        _tcb\n          .overrideDirective(TaskListComponent, RouterLinkWithHref, DummyRouterLink)\n          .overrideDirective(TaskItemComponent, RouterLinkWithHref, DummyRouterLink)\n          .createAsync(TaskListComponent)\n          .then(_fixture => {\n            fixture = _fixture;\n            console.log(\"fixture\", fixture);\n            done();\n          });\n      })\n  });\n```\n\nthis leads to:\n\n`Chrome 48.0.2564 (Linux 0.0.0) TaskList Component should call deleteTask when clicking the trash-bin FAILED\n    Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.`\n\n**Expected/desired behavior**\n\nbeforeEach callback should wait for returned promises / should be able to work with done-function\n\n**What is the motivation / use case for changing the behavior?**\n\nbeing able to initialize the component under test in beforeEach-Hook\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.4\n- **Browser:** [all ] \n- **Language:** [TS] \n","author":{"url":"https://github.com/choeller","@type":"Person","name":"choeller"},"datePublished":"2016-07-05T10:16:02Z","url":"https://github.com/angular/angular/issues/9815"}

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:cb151f04-25e6-fef8-bbd9-76641a2dc083
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id838C:2D12EA:5B3C6:7E893:6B056BFE
html-safe-nonce5b456d45f7d27e6bef93c6c4f71fc0d58cc4bf575e3b7ba9e774a783e428c396
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MzhDOjJEMTJFQTo1QjNDNjo3RTg5Mzo2QjA1NkJGRSIsInZpc2l0b3JfaWQiOiIzMDQ3OTMzNjc1MjI5NzY4NzAyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9f0d25f19d5b7f0b6c6fbbc68c72716c083e1bfee96c9f31f037383039058ada
hovercard-subject-tagissue:163816879
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/9815/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f811f12a6de76bf7b064030bdaaf0947f7cf6fed604a1327b6b67c6af8944fb4/angular/angular/issues/9815
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f811f12a6de76bf7b064030bdaaf0947f7cf6fed604a1327b6b67c6af8944fb4/angular/angular/issues/9815
og:image:altI'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechoeller
hostnamegithub.com
expected-hostnamegithub.com
None9b4256ac5f3e310e7945ef5b71c9cb9e264357b1eb20e91d369ed6502a4c486c
turbo-cache-controlno-preview
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
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
releasef089e689ad324655ac44bf6cdbc04d976105b374
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/9815#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F9815
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%2Fissues%2F9815
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
Reloadhttps://github.com/angular/angular/issues/9815
Reloadhttps://github.com/angular/angular/issues/9815
Reloadhttps://github.com/angular/angular/issues/9815
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests141 (141)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
https://github.com/angular/angular
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/9815
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/9815
bug(testing) Unable to do async-initialization in beforeEach-hookhttps://github.com/angular/angular/issues/9815#top
area: testinghttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20testing%22
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 5, 2016https://github.com/angular/angular/issues/9815#issue-163816879
https://github.com/katherinegould
katherinegouldhttps://github.com/katherinegould
on Jul 5, 2016https://github.com/angular/angular/issues/9815#issuecomment-230447557
https://github.com/BenjaminRhys-Davies
BenjaminRhys-Davieshttps://github.com/BenjaminRhys-Davies
on Jul 5, 2016https://github.com/angular/angular/issues/9815#issuecomment-230450602
https://github.com/cexbrayat
cexbrayathttps://github.com/cexbrayat
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230761817
https://github.com/katherinegould
katherinegouldhttps://github.com/katherinegould
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230763358
https://github.com/cexbrayat
cexbrayathttps://github.com/cexbrayat
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230766205
@katherinegouldhttps://github.com/katherinegould
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230774951
@cexbrayathttps://github.com/cexbrayat
@katherinegouldhttps://github.com/katherinegould
https://github.com/cexbrayat
cexbrayathttps://github.com/cexbrayat
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230790207
@choellerhttps://github.com/choeller
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230804894
@cexbrayathttps://github.com/cexbrayat
@juliemrhttps://github.com/juliemr
https://github.com/katherinegould
katherinegouldhttps://github.com/katherinegould
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230807667
@choellerhttps://github.com/choeller
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230813586
https://github.com/jonnysamps
jonnysampshttps://github.com/jonnysamps
on Jul 6, 2016https://github.com/angular/angular/issues/9815#issuecomment-230868941
https://github.com/meeroslav
meeroslavhttps://github.com/meeroslav
on Jul 11, 2016https://github.com/angular/angular/issues/9815#issuecomment-231734804
https://github.com/dalamgir
dalamgirhttps://github.com/dalamgir
on Jul 11, 2016https://github.com/angular/angular/issues/9815#issuecomment-231772826
robertmesserlehttps://github.com/robertmesserle
area: testinghttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20testing%22
on Jul 19, 2016https://github.com/angular/angular/issues/9815#event-726900379
https://github.com/juliemr
juliemrhttps://github.com/juliemr
on Jul 19, 2016https://github.com/angular/angular/issues/9815#issuecomment-233533187
@choellerhttps://github.com/choeller
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 19, 2016https://github.com/angular/angular/issues/9815#issuecomment-233534995
@juliemrhttps://github.com/juliemr
https://github.com/angular/angular-cli/blob/master/addon/ng2/blueprints/ng2/files/config/karma.conf.jshttps://github.com/angular/angular-cli/blob/master/addon/ng2/blueprints/ng2/files/config/karma.conf.js
https://github.com/juliemr
juliemrhttps://github.com/juliemr
on Jul 19, 2016https://github.com/angular/angular/issues/9815#issuecomment-233535760
@choellerhttps://github.com/choeller
choellerhttps://github.com/choeller
on Jul 19, 2016https://github.com/angular/angular/issues/9815#event-727057445
fix(test) corrected order of loaded fileshttps://github.com/choeller/angular-cli/commit/ac860988b49035bf1db27e796d16539fc33ddf29
ac86098https://github.com/choeller/angular-cli/commit/ac860988b49035bf1db27e796d16539fc33ddf29
fix(test) corrected order of loaded fileshttps://github.com/choeller/angular-cli/commit/3e29632c6220ce89aa19ce814a5edc54e3a3a6b2
3e29632https://github.com/choeller/angular-cli/commit/3e29632c6220ce89aa19ce814a5edc54e3a3a6b2
https://github.com/choeller
choellerhttps://github.com/choeller
on Jul 19, 2016https://github.com/angular/angular/issues/9815#issuecomment-233536684
choellerhttps://github.com/choeller
on Jul 19, 2016https://github.com/angular/angular/issues/9815#event-727072309
fix(test) corrected order of loaded fileshttps://github.com/choeller/angular-cli/commit/2fcb6ab069d4f697ade11c4d7ad36ad2784accc9
2fcb6abhttps://github.com/choeller/angular-cli/commit/2fcb6ab069d4f697ade11c4d7ad36ad2784accc9
vikermanhttps://github.com/vikerman
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jan 26, 2018https://github.com/angular/angular/issues/9815#event-1444468497
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Sep 13, 2019https://github.com/angular/angular/issues/9815#issuecomment-531107909
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 Sep 13, 2019https://github.com/angular/angular/issues/9815#event-2631266498
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/9815
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/9815
area: testinghttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20testing%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.