René's URL Explorer Experiment


Title: While testing with Jest 29, zone.js prints an Unhandled Promise rejection using firstValueFrom · Issue #49110 · angular/angular · GitHub

Open Graph Title: While testing with Jest 29, zone.js prints an Unhandled Promise rejection using firstValueFrom · Issue #49110 · angular/angular

X Title: While testing with Jest 29, zone.js prints an Unhandled Promise rejection using firstValueFrom · Issue #49110 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? Yes Description I use Jest for the app testing. After updating Jest 28 to 29 I found this issue: I have this function on the app component: public async...

Open Graph Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? Yes Description I use Jest for the app testing. After updating Jest 28 to 29 I found this issue: I have this fun...

X Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? Yes Description I use Jest for the app testing. After updating Jest 28 to 29 I found this issue: I have this fun...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"While testing with Jest 29, zone.js prints an Unhandled Promise rejection using firstValueFrom","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nzone.js\r\n\r\n### Is this a regression?\r\n\r\nYes\r\n\r\n### Description\r\n\r\nI use Jest for the app testing.\r\n\r\nAfter updating Jest 28 to 29 I found this issue: \r\n\r\nI have this function on the app component: \r\n\r\n```\r\npublic async testFunction() {\r\n    await firstValueFrom(of('').pipe(\r\n      map(() => {\r\n        throw 'error'\r\n      })\r\n    ))\r\n  }\r\n```\r\n\r\nand I have this test on the spec file: \r\n\r\n```\r\nit('should throw an error', async () => {\r\n    const fixture = TestBed.createComponent(AppComponent);\r\n    const app = fixture.componentInstance;\r\n    try {\r\n      await app.testFunction();\r\n    } catch (e) {\r\n      expect(true).toEqual(true);\r\n    }\r\n  });\r\n```\r\nUsing Jest 28 it works perfect, but If I update to Jest 29 Zone.js prints a console.error like the promise was unhandled but as you can see on the test I handle the promise.\r\n\r\nThe test passes, but the console.error is annoying.\r\n\r\nPlease, read the anything else part to see my jest configuration. To compare between Jest versions you can execute: \r\n\r\n`npm uninstall jest jest-preset-angular @types/jest`\r\nJest 29 try: `npm install --save-dev jest jest-preset-angular@next @types/jest`\r\nJest 28 try: `npm install --save-dev jest jest-preset-angular @types/jest`\r\n\r\nThanks!\r\n\r\n\r\n\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\n[example-project](https://github.com/jordibaliellas/angular-jest-29)\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nconsole.error\r\n    Unhandled Promise rejection: error ; Zone: ProxyZone ; Task: null ; Value: error undefined\r\n\r\n      at Object.api.onUnhandledError (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1109:29)\r\n      at handleUnhandledRejection (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1137:17)\r\n      at _loop_2 (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1128:21)\r\n      at Object.api.microtaskDrainDone (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:1132:17)\r\n      at drainMicroTaskQueue (node_modules/zone.js/bundles/zone-testing-bundle.umd.js:639:22)\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n```true\r\nAngular CLI: 14.2.10\r\nNode: 18.13.0 (Unsupported)\r\nPackage Manager: npm 8.19.3\r\nOS: darwin arm64\r\n\r\nAngular: 14.2.12\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... platform-browser, platform-browser-dynamic, router\r\n\r\nPackage                         Version\r\n---------------------------------------------------------\r\n@angular-devkit/architect       0.1402.10\r\n@angular-devkit/build-angular   14.2.10\r\n@angular-devkit/core            14.2.10\r\n@angular-devkit/schematics      14.2.10\r\n@angular/cli                    14.2.10\r\n@schematics/angular             14.2.10\r\nrxjs                            7.5.7\r\ntypescript                      4.7.4\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nUsing Jest 29 for testing: \r\n\r\n```\r\n\"@types/jest\": \"^29.4.0\",\r\n\"jest\": \"^29.4.3\",\r\n\"jest-preset-angular\": \"^13.0.0-next.1\",\r\n```\r\n\r\njest.config.ts file: \r\n\r\n```\r\nimport type { Config } from '@jest/types'\r\n\r\nexport default \u003cConfig.InitialOptions>{\r\n    preset: 'jest-preset-angular',\r\n    setupFilesAfterEnv: ['\u003crootDir>/setup-jest.ts'],\r\n}\r\n```\r\n\r\nsetup-jest.ts file: \r\n\r\n```\r\nimport 'jest-preset-angular/setup-jest';\r\n```","author":{"url":"https://github.com/jordibaliellas","@type":"Person","name":"jordibaliellas"},"datePublished":"2023-02-16T13:29:54Z","url":"https://github.com/angular/angular/issues/49110"}

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:5c07119e-09be-45c4-11b1-b58e44e4113d
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id916C:63875:18B15F7:209A940:6B0140AB
html-safe-noncea8716753935ee4f48c47cfb6e03862b85839724b6a27491ab3ead02d20c30ec2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTZDOjYzODc1OjE4QjE1Rjc6MjA5QTk0MDo2QjAxNDBBQiIsInZpc2l0b3JfaWQiOiI4Mzg3MDY5MzM4MzUxMzg2Nzk1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac751392f94ba0d94ceb9820222ce6a4bb54957ebd5ee2079ba05cc48445bef803
hovercard-subject-tagissue:1587684085
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/49110/issue_layout
twitter:imagehttps://opengraph.githubassets.com/cb84b42a2d153c2170e1a87866185e10a8745868d5de997aaa86d5384b67bff3/angular/angular/issues/49110
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/cb84b42a2d153c2170e1a87866185e10a8745868d5de997aaa86d5384b67bff3/angular/angular/issues/49110
og:image:altWhich @angular/* package(s) are the source of the bug? zone.js Is this a regression? Yes Description I use Jest for the app testing. After updating Jest 28 to 29 I found this issue: I have this fun...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejordibaliellas
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angular/issues/49110#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F49110
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%2F49110
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/49110
Reloadhttps://github.com/angular/angular/issues/49110
Reloadhttps://github.com/angular/angular/issues/49110
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues836 (836)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/49110
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/49110
While testing with Jest 29, zone.js prints an Unhandled Promise rejection using firstValueFromhttps://github.com/angular/angular/issues/49110#top
https://github.com/JiaLiPassion
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%22
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/jordibaliellas
jordibaliellashttps://github.com/jordibaliellas
on Feb 16, 2023https://github.com/angular/angular/issues/49110#issue-1587684085
example-projecthttps://github.com/jordibaliellas/angular-jest-29
JoostKhttps://github.com/JoostK
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%22
on Feb 16, 2023https://github.com/angular/angular/issues/49110#event-8536966248
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Feb 16, 2023https://github.com/angular/angular/issues/49110#event-8536966473
jordibaliellashttps://github.com/jordibaliellas
on Feb 16, 2023https://github.com/angular/angular/issues/49110#event-8537010134
AndrewKushnirhttps://github.com/AndrewKushnir
JiaLiPassionhttps://github.com/JiaLiPassion
on Feb 24, 2023https://github.com/angular/angular/issues/49110#event-8604365161
https://github.com/dadalxx
dadalxxhttps://github.com/dadalxx
on Feb 27, 2023https://github.com/angular/angular/issues/49110#issuecomment-1445599973
https://github.com/jordibaliellas
jordibaliellashttps://github.com/jordibaliellas
on Feb 27, 2023https://github.com/angular/angular/issues/49110#issuecomment-1446328638
JiaLiPassionhttps://github.com/JiaLiPassion
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
on Mar 6, 2023https://github.com/angular/angular/issues/49110#event-8669070215
https://github.com/JiaLiPassion
JiaLiPassionhttps://github.com/JiaLiPassion
on Mar 6, 2023https://github.com/angular/angular/issues/49110#issuecomment-1455274052
https://github.com/jordibaliellas
jordibaliellashttps://github.com/jordibaliellas
on Mar 6, 2023https://github.com/angular/angular/issues/49110#issuecomment-1455689741
https://github.com/JiaLiPassion
JiaLiPassionhttps://github.com/JiaLiPassion
on Mar 19, 2023https://github.com/angular/angular/issues/49110#issuecomment-1475116663
@jordibaliellashttps://github.com/jordibaliellas
https://github.com/jordibaliellas
jordibaliellashttps://github.com/jordibaliellas
on Mar 19, 2023https://github.com/angular/angular/issues/49110#issuecomment-1475218787
@JiaLiPassionhttps://github.com/JiaLiPassion
atscotthttps://github.com/atscott
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
bc412fdhttps://github.com/angular/angular/commit/bc412fd537f965b20dce69232ef66f152962dc06
on Mar 27, 2023https://github.com/angular/angular/issues/49110#event-8855462853
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Apr 27, 2023https://github.com/angular/angular/issues/49110#issuecomment-1524252675
automatic conversation locking policyhttps://github.com/angular/angular/blob/8f24bc9443b3872fe095d9f7f77b308a361a13b4/docs/GITHUB_PROCESS.md#conversation-locking
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Apr 27, 2023https://github.com/angular/angular/issues/49110#event-9108868625
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/49110
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/49110
JiaLiPassionhttps://github.com/JiaLiPassion
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%22
state: has PRhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22state%3A%20has%20PR%22
needsTriageNo due datehttps://github.com/angular/angular/milestone/83
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.