Title: Test wrapped in waitForAsync does not receive parameterized values from jest it.each · Issue #61717 · angular/angular · GitHub
Open Graph Title: Test wrapped in waitForAsync does not receive parameterized values from jest it.each · Issue #61717 · angular/angular
X Title: Test wrapped in waitForAsync does not receive parameterized values from jest it.each · Issue #61717 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When a parameterized jest test, with it.each is wrapped in a waitForAsync all the parameterized values are passed to the test asundefined. ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When a parameterized jest test, with it.each is wrapped in a waitForAsync all the parameterized val...
X Description: Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When a parameterized jest test, with it.each is wrapped in a waitForAsync all the parameterized val...
Opengraph URL: https://github.com/angular/angular/issues/61717
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test wrapped in waitForAsync does not receive parameterized values from jest it.each","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\ncore\n\n### Is this a regression?\n\nYes\n\n### Description\n\nWhen a parameterized jest test, with it.each is wrapped in a `waitForAsync` all the parameterized values are passed to the test as`undefined`.\n\nIf the test is not wrapped in `waitForAsync` the parameterized values are passed correctly.\n\n```ts\n// values are passed as undefined\n\nit.each([\n ['first', 1],\n ['second', 2],\n ['third', 3],\n ])(\n 'My Test %s %s',\n waitForAsync((param1: string, param2: number) => {\n console.log('param1', param1) // undefined;\n console.log('param2', param2) // undefined;\n\n ...\n }),\n );\n```\n\nWhen using a normal array to iterate over parameters it seems to work fine.\n```ts\n// Values are passed properly\n\n[\n { param1: 'first', param2: 1 },\n { param1: 'second', param2: 2 },\n { param1: 'third', param2: 3 },\n ].forEach(({ param1, param2 }) => {\n it(`My test with params ${param1} and ${param2}`, waitForAsync(() => {\n console.log('param1', param1) // 'first' | 'second' | 'third';\n console.log('param2', param2); // 1 | 2 | 3\n\n ...\n }))\n });\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://github.com/timhonermann/it-each-wait-for-async-issue/blob/main/README.md\n\n### Please provide the exception or error you saw\n\n```true\nNo error or exception.\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 19.2.13\nNode: 22.2.0\nPackage Manager: npm 10.7.0\nOS: linux x64\n\nAngular: 19.2.13\n... cli, common, compiler, compiler-cli, core, forms\n... platform-browser, platform-browser-dynamic, router\n\nPackage Version\n---------------------------------------------------------\n@angular-devkit/architect 0.1902.13\n@angular-devkit/build-angular 19.2.13\n@angular-devkit/core 19.2.13\n@angular-devkit/schematics 19.2.13\n@schematics/angular 19.2.13\nrxjs 7.8.2\ntypescript 5.7.3\nzone.js 0.15.1\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/timhonermann","@type":"Person","name":"timhonermann"},"datePublished":"2025-05-28T10:14:34Z","url":"https://github.com/angular/angular/issues/61717"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c3c25f9a-b729-d600-5683-bc5a7961dbc9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C24E:1FAE:1301346:195F512:6B02236C |
| html-safe-nonce | 1afe3ced31b93735025e4fff1a94e77120906757b2730152161ac2dcacfc529a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjRFOjFGQUU6MTMwMTM0NjoxOTVGNTEyOjZCMDIyMzZDIiwidmlzaXRvcl9pZCI6IjE4NjkyNjQ2NzA2MTE4NzQ2NjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9c9e3a01ee33fc590c058419c08b944b679f40ae397fdae879e25d054f82a406 |
| hovercard-subject-tag | issue:3096823928 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/61717/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4db78cefa06fb50278ed58fa149b84bde9d9fb0b4eb78a21fc3b254bc50f09d2/angular/angular/issues/61717 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4db78cefa06fb50278ed58fa149b84bde9d9fb0b4eb78a21fc3b254bc50f09d2/angular/angular/issues/61717 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? core Is this a regression? Yes Description When a parameterized jest test, with it.each is wrapped in a waitForAsync all the parameterized val... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | timhonermann |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width