Title: zone.js: Patched test functions (`it`, `test`, `describe`, etc.) are not used if importing from `@jest/globals` directly · Issue #47603 · angular/angular · GitHub
Open Graph Title: zone.js: Patched test functions (`it`, `test`, `describe`, etc.) are not used if importing from `@jest/globals` directly · Issue #47603 · angular/angular
X Title: zone.js: Patched test functions (`it`, `test`, `describe`, etc.) are not used if importing from `@jest/globals` directly · Issue #47603 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description If one does not use the globally provided Jest functions like it but instead imports them locally (see ...), then the patch has no effect...
Open Graph Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description If one does not use the globally provided Jest functions like it but instead imports them locally...
X Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description If one does not use the globally provided Jest functions like it but instead imports them locally...
Opengraph URL: https://github.com/angular/angular/issues/47603
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js: Patched test functions (`it`, `test`, `describe`, etc.) are not used if importing from `@jest/globals` directly","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nzone.js\n\n### Is this a regression?\n\nNo\n\n### Description\n\nIf one does not use the globally provided Jest functions like `it` but instead imports them locally (see ...), then the patch has no effect and zone.js is not working:\r\n\r\n```typescript\r\nimport { TestBed, fakeAsync } from '@angular/core/testing';\r\nimport { AppComponent } from './app.component';\r\n\r\nimport { it } from \"@jest/globals\"; // \u003c- this line leads to the error\r\n\r\ndescribe('AppComponent', () => {\r\n beforeEach(async () => {\r\n await TestBed.configureTestingModule({\r\n declarations: [\r\n AppComponent\r\n ],\r\n }).compileComponents();\r\n });\r\n\r\n it('bla', fakeAsync(async () => {\r\n }));\r\n});\r\n\r\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\n_No response_\n\n### Please provide the exception or error you saw\n\n```true\nExpected to be running in 'ProxyZone', but it was not found.\n```\n\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 14.2.4\r\nNode: 18.10.0 (Unsupported)\r\nPackage Manager: npm 8.19.2\r\nOS: win32 x64\r\n\r\nAngular: 14.2.4\r\n... animations, cli, 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.4\r\n@angular-devkit/build-angular 14.2.4\r\n@angular-devkit/core 14.2.4\r\n@angular-devkit/schematics 14.2.4\r\n@schematics/angular 14.2.4\r\nrxjs 7.5.7\r\ntypescript 4.7.4\n```\n\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/dhardtke","@type":"Person","name":"dhardtke"},"datePublished":"2022-10-03T00:41:48Z","url":"https://github.com/angular/angular/issues/47603"}
| 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:720547b6-1a5b-6c66-9ec1-4cfa222804f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAD0:34CAB:3E1E743:4F600F4:6B02219A |
| html-safe-nonce | 152427d1d78b911ce9dceeaea2569b07454ebca65d02558930f4e79fd986650f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUQwOjM0Q0FCOjNFMUU3NDM6NEY2MDBGNDo2QjAyMjE5QSIsInZpc2l0b3JfaWQiOiI5MTg4NDI5MjAyNjM3MDcwNzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6db226d21b51d40c950e56974aa886aae699ac16fbd7a9d6865fad24591f78d7 |
| hovercard-subject-tag | issue:1393957497 |
| 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/47603/issue_layout |
| twitter:image | https://opengraph.githubassets.com/be184682dd2cd97d612caf1383195a82dd63cb1f34ce79f5bd04c92a6eec60ea/angular/angular/issues/47603 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/be184682dd2cd97d612caf1383195a82dd63cb1f34ce79f5bd04c92a6eec60ea/angular/angular/issues/47603 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No Description If one does not use the globally provided Jest functions like it but instead imports them locally... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dhardtke |
| 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