Title: zone.js fails to patch mocha v8.3.1 and up · Issue #42834 · angular/angular · GitHub
Open Graph Title: zone.js fails to patch mocha v8.3.1 and up · Issue #42834 · angular/angular
X Title: zone.js fails to patch mocha v8.3.1 and up · Issue #42834 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description I've created a fresh Angular 12 project with the CLI, refactored tests to use Mocha instead of Jasmine and the tests failed. ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description I've created a fresh Angular 12 project with the CLI, refactored tests to use Mocha i...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description I've created a fresh Angular 12 project with the CLI, refactored tests to use...
Opengraph URL: https://github.com/angular/angular/issues/42834
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js fails to patch mocha v8.3.1 and up","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nDon't known / other\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nI've created a fresh Angular 12 project with the CLI, refactored tests to use Mocha instead of Jasmine and the tests failed.\r\n\r\n- Clone the repo and run `npm test` - everything will work fine\r\n- Open `package.json` and set the `mocha` dependency to `8.3.1` or higher, then run `npm test` again\r\n- You'll now get the exception below.\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://github.com/Alorel/zone.js-mocha-patch-bug-reproduction\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```\r\nRangeError: Maximum call stack size exceeded\r\n at wrapTestInZone (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1024:1)\r\n at global.beforeEach.global.setup.Mocha.beforeEach (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1077:1)\r\n at exports.beforeEach (node_modules/mocha/mocha.js:28402:65)\r\n at global.beforeEach.global.setup.Mocha.beforeEach (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1077:1)\r\n at exports.beforeEach (node_modules/mocha/mocha.js:28402:65)\r\n at global.beforeEach.global.setup.Mocha.beforeEach (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1077:1)\r\n at exports.beforeEach (node_modules/mocha/mocha.js:28402:65)\r\n at global.beforeEach.global.setup.Mocha.beforeEach (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1077:1)\r\n at exports.beforeEach (node_modules/mocha/mocha.js:28402:65)\r\n at global.beforeEach.global.setup.Mocha.beforeEach (http://localhost:9876/_karma_webpack_/webpack:/node_modules/zone.js/fesm2015/zone-testing.js:1077:1)\r\n```\r\n\r\n### Please provide the environment you discovered this bug in\r\n\r\n```\r\nAngular CLI: 12.1.1\r\nNode: 14.16.1\r\nPackage Manager: npm 7.11.2\r\nOS: linux x64\r\n\r\nAngular: 12.1.1\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.1201.1\r\n@angular-devkit/build-angular 12.1.1\r\n@angular-devkit/core 12.1.1\r\n@angular-devkit/schematics 12.1.1\r\n@schematics/angular 12.1.1\r\nrxjs 6.6.7\r\ntypescript 4.3.5\r\n```\r\n\r\n\r\n### Anything else?\r\n\r\nThe `zone.js` version is `0.11.4`. The same happens on Angular 11 and zone `0.11.3`","author":{"url":"https://github.com/Alorel","@type":"Person","name":"Alorel"},"datePublished":"2021-07-13T10:50:40Z","url":"https://github.com/angular/angular/issues/42834"}
| 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:70882848-b6f8-fb38-86f5-f0c31fc9ed82 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C290:26ECEB:F538C4:13AE921:6B00FCC1 |
| html-safe-nonce | adb793a33367066b455feee1910eec673c89bb1b269bdff373416cca650590f8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjkwOjI2RUNFQjpGNTM4QzQ6MTNBRTkyMTo2QjAwRkNDMSIsInZpc2l0b3JfaWQiOiI3ODAwMTA1NTYxMzUzMTU3ODI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2788bc54952afb852ec52e0cc540ebaa3738c60b61b2bc2c815b4fa7fa525190 |
| hovercard-subject-tag | issue:943169539 |
| 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/42834/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de14164f8632a3c3582db346e8a6b25108f124dbcfb900eaf1cd14fe7875704f/angular/angular/issues/42834 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de14164f8632a3c3582db346e8a6b25108f124dbcfb900eaf1cd14fe7875704f/angular/angular/issues/42834 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? No Description I've created a fresh Angular 12 project with the CLI, refactored tests to use Mocha i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Alorel |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width