René's URL Explorer Experiment


Title: zone.js vitest-patch breaks all describe/it modifiers: describe.skip runs the suite, it.skip/it.todo silently vanish, .each is miswired · Issue #69748 · angular/angular · GitHub

Open Graph Title: zone.js vitest-patch breaks all describe/it modifiers: describe.skip runs the suite, it.skip/it.todo silently vanish, .each is miswired · Issue #69748 · angular/angular

X Title: zone.js vitest-patch breaks all describe/it modifiers: describe.skip runs the suite, it.skip/it.todo silently vanish, .each is miswired · Issue #69748 · angular/angular

Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No — the bug is present in the initial vitest support (zone.js/plugins/vitest-patch) and is still present in 0.16.2. Description zone.js/plugins/vitest-...

Open Graph Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No — the bug is present in the initial vitest support (zone.js/plugins/vitest-patch) and is still present in 0.1...

X Description: Which @angular/* package(s) are the source of the bug? zone.js Is this a regression? No — the bug is present in the initial vitest support (zone.js/plugins/vitest-patch) and is still present in 0.1...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zone.js vitest-patch breaks all describe/it modifiers: describe.skip runs the suite, it.skip/it.todo silently vanish, .each is miswired","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nzone.js\n\n### Is this a regression?\n\nNo — the bug is present in the initial vitest support (`zone.js/plugins/vitest-patch`) and is still present in 0.16.2.\n\n### Description\n\n`zone.js/plugins/vitest-patch` re-wraps `describe`/`suite`/`it`/`test` for zone support and also replaces all of their modifiers (`skip`, `only`, `todo`, `each`, `for`, `skipIf`, `runIf`, `concurrent`, `sequential`, `shuffle`). The replacement treats **every** modifier as an `.each`-style curried factory **and** calls the plain base function instead of the modifier, which breaks all of them:\n\n```js\n// packages/zone.js/lib/vitest/vitest.ts (fesm2015/vitest-patch.js in the dist)\n\n// describe modifiers:\nfor (const factoryName of DESCRIBE_FACTORY_NAMES) {\n  context[methodName][factoryName] = function (...factoryArgs) {\n    const originalDescribeFn = originalVitestFn.apply(this, factoryArgs); // (1)\n    return function (...args) {                                          // (2)\n      args[1] = wrapDescribeInZone(args[1]);\n      return originalDescribeFn.apply(this, args);\n    };\n  };\n}\n\n// it/test modifiers:\nfor (const factoryName of TEST_FACTORY_NAMES) {\n  context[methodName][factoryName] = function (...factoryArgs) {\n    return function (...args) {                                          // (3)\n      args[1] = wrapTestInZone(args[1]);\n      return originalVitestFn.apply(this, factoryArgs).apply(this, args);\n    };\n  };\n}\n```\n\nConcrete consequences:\n\n- **`describe.skip('name', fn)` registers a NORMAL suite — the skip is silently dropped and the tests run** (and can fail). At (1), `originalVitestFn.apply(this, ['name', fn])` is just `describe('name', fn)`, executed immediately; the function returned at (2) is never called by user code, and the suite body registered at (1) is also not zone-wrapped.\n- **`it.skip(...)`, `it.todo(...)`, `it.only(...)`, etc. silently vanish from the run.** The modifier returns the inner function at (3), which user code never invokes, so nothing is registered at all. Skip/todo counts read 0 and the tests disappear from the report without a trace.\n- **Even the genuinely curried modifiers (`each`, `for`) are broken**, because (1)/(3) call `originalVitestFn` (plain `describe`/`it`) instead of `originalVitestFn[factoryName]`. `describe.each(table)('name %s', fn)` executes `describe(table)` — the table object as the suite name.\n- Chained modifiers (`it.skip.each(...)`) and props like `describe.todo` are likewise broken.\n\nThe unpatched originals are stashed under `Zone.__symbol__('describe')` / `('suite')` / `('it')` / `('test')`, which is what makes the workaround below possible.\n\nThe fix shape: non-curried modifiers (`skip`, `only`, `todo`, `concurrent`, `sequential`, `shuffle`) need the same wrapping as the base function but delegating to `originalVitestFn[factoryName]`; curried ones (`each`, `for`, `skipIf`, `runIf`) need `originalVitestFn[factoryName](...factoryArgs)` first, then arg-wrapping in the returned registrar. (`skipIf`/`runIf` are condition-curried: `it.skipIf(cond)(name, fn)`.)\n\n### Please provide a link to a minimal reproduction of the bug\n\nInline reproduction — any zone-based Angular CLI v21 app using the `unit-test` builder with `runner: \"vitest\"` (which auto-loads `zone.js/plugins/vitest-patch`), or any Vitest setup that imports `zone.js`, `zone.js/testing`'s Proxy/SyncTest zone specs, and `zone.js/plugins/vitest-patch`:\n\n```ts\n// repro.spec.ts\ndescribe.skip('skipped suite', () => {\n  it('must not run', () => {\n    throw new Error('describe.skip ran anyway');\n  });\n});\n\ndescribe('modifiers', () => {\n  it.skip('skipped test', () => {\n    throw new Error('never');\n  });\n  it.todo('todo test');\n  it('control', () => {\n    expect(true).toBe(true);\n  });\n});\n```\n\nExpected (plain Vitest): `1 passed | 2 skipped | 1 todo`, no failures.\n\nActual with `vitest-patch`: the `describe.skip` suite runs and fails with `describe.skip ran anyway`; `it.skip` and `it.todo` are absent from the report entirely — `1 failed | 1 passed`, skipped/todo counts are 0.\n\n### Please provide the exception or error you saw\n\nNo exception from zone.js itself — that's the dangerous part. Suites the author explicitly skipped (e.g. because they're known-broken) execute and fail, and `it.skip`/`it.todo` tests silently disappear, so a migrated suite under-reports its own size with no signal.\n\nObserved while migrating a 433-file / 735-test Angular 21 suite from Karma to the `@angular/build:unit-test` Vitest runner: every `describe.skip` suite began executing (NG0201 failures etc.), and the run's skip count read 0 while the total test count dropped versus Karma.\n\n### Workaround\n\nRestore the original modifiers from the stashed unpatched functions in a `setupFiles` entry (safe as long as the suite doesn't rely on zone wrapping inside `.only`/`.each` bodies — skipped/todo bodies never execute anyway):\n\n```ts\nconst g = globalThis as any;\nconst zoneSymbol = g.Zone.__symbol__;\nconst MODIFIERS = [\n  'skip', 'skipIf', 'runIf', 'only', 'concurrent',\n  'sequential', 'shuffle', 'todo', 'each', 'for'\n];\nfor (const name of ['describe', 'suite', 'it', 'test']) {\n  const original = g[zoneSymbol(name)];\n  const patched = g[name];\n  if (!original || !patched || original === patched) continue;\n  for (const mod of MODIFIERS) {\n    if (typeof original[mod] === 'function') {\n      patched[mod] = original[mod].bind(original);\n    }\n  }\n}\n```\n\n### Please provide the environment you discovered this bug in\n\n- zone.js: 0.16.2\n- vitest: 4.1.10 (browser mode, `@vitest/browser-playwright` 4.1.10, headless Chromium)\n- @angular/build: 21.2.9 (`unit-test` builder, `runner: \"vitest\"`)\n- @angular/core: 21.2.10\n- OS: Windows 11, Node 20.19\n\n### Anything else?\n\nThe `beforeEach`/`afterEach`/`beforeAll`/`afterAll` patching in the same file is fine — only the modifier/factory loops are affected.\n","author":{"url":"https://github.com/janiis-scott","@type":"Person","name":"janiis-scott"},"datePublished":"2026-07-12T04:36:01Z","url":"https://github.com/angular/angular/issues/69748"}

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:6ada24c6-517f-e4d4-88a7-c9aa63289a01
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD94C:1DCB8C:12897B3:188227D:6B011872
html-safe-nonce8083c0e53f575af251d751bb7b9d0b2102cd40ddfcaffce8f5d0e2504b828d4a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOTRDOjFEQ0I4QzoxMjg5N0IzOjE4ODIyN0Q6NkIwMTE4NzIiLCJ2aXNpdG9yX2lkIjoiNTQ3OTU3Nzg3NzU0MzA1NjUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacbaa54899147e4be8b81d6b4aa61f83453f9a4d057afdf7da3a233759a4a4809e
hovercard-subject-tagissue:4865418532
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/69748/issue_layout
twitter:imagehttps://opengraph.githubassets.com/e01157a4f8dffa2837d056647592b985d5e8d1d78be11f2a2c0bbf845d2e8b0f/angular/angular/issues/69748
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/e01157a4f8dffa2837d056647592b985d5e8d1d78be11f2a2c0bbf845d2e8b0f/angular/angular/issues/69748
og:image:altWhich @angular/* package(s) are the source of the bug? zone.js Is this a regression? No — the bug is present in the initial vitest support (zone.js/plugins/vitest-patch) and is still present in 0.1...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejaniis-scott
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/69748#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F69748
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%2F69748
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/69748
Reloadhttps://github.com/angular/angular/issues/69748
Reloadhttps://github.com/angular/angular/issues/69748
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/69748
New issuehttps://github.com/login?return_to=https://github.com/angular/angular/issues/69748
#69755https://github.com/angular/angular/pull/69755
zone.js vitest-patch breaks all describe/it modifiers: describe.skip runs the suite, it.skip/it.todo silently vanish, .each is miswiredhttps://github.com/angular/angular/issues/69748#top
#69755https://github.com/angular/angular/pull/69755
https://github.com/hawkgs
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%22
needsTriagehttps://github.com/angular/angular/milestone/83
https://github.com/janiis-scott
janiis-scotthttps://github.com/janiis-scott
on Jul 12, 2026https://github.com/angular/angular/issues/69748#issue-4865418532
angular-robothttps://github.com/apps/angular-robot
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%22
gemini-triagedhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22gemini-triaged%22
on Jul 12, 2026https://github.com/angular/angular/issues/69748#event-27867199863
ngbothttps://github.com/apps/ngbot
needsTriagehttps://github.com/angular/angular/milestone/83
on Jul 12, 2026https://github.com/angular/angular/issues/69748#event-27867200102
hawkgshttps://github.com/hawkgs
gemini-triagedhttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22gemini-triaged%22
on Jul 13, 2026https://github.com/angular/angular/issues/69748#event-27896204214
hawkgshttps://github.com/hawkgs
on Jul 13, 2026https://github.com/angular/angular/issues/69748#event-27896386192
hawkgshttps://github.com/hawkgs
on Jul 13, 2026https://github.com/angular/angular/issues/69748#event-27907039749
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/hawkgs/angular/commit/84f698e12a2ad32c027d9cb416d6521fe6e87a7d
https://docs.github.com/articles/closing-issues-via-commit-messages
84f698ehttps://github.com/hawkgs/angular/commit/84f698e12a2ad32c027d9cb416d6521fe6e87a7d
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/hawkgs/angular/commit/25ce49d45bc8b6ae1fbdb9f4b0201f27eba81aaf
https://docs.github.com/articles/closing-issues-via-commit-messages
25ce49dhttps://github.com/hawkgs/angular/commit/25ce49d45bc8b6ae1fbdb9f4b0201f27eba81aaf
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/hawkgs/angular/commit/ebf0e2a36e9695a09029de71af4f577d1cf186f7
https://docs.github.com/articles/closing-issues-via-commit-messages
ebf0e2ahttps://github.com/hawkgs/angular/commit/ebf0e2a36e9695a09029de71af4f577d1cf186f7
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/hawkgs/angular/commit/63dc2dcf5e4a4ed6d7ca89fdc6262a0f5298e27f
https://docs.github.com/articles/closing-issues-via-commit-messages
63dc2dchttps://github.com/hawkgs/angular/commit/63dc2dcf5e4a4ed6d7ca89fdc6262a0f5298e27f
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
on Jul 22, 2026https://github.com/angular/angular/issues/69748#event-28320437634
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/angular/angular/commit/e23541b26385753ff2014d5f48cd1003f93cc27c
https://docs.github.com/articles/closing-issues-via-commit-messages
e23541bhttps://github.com/angular/angular/commit/e23541b26385753ff2014d5f48cd1003f93cc27c
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
completedhttps://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#69755https://github.com/angular/angular/pull/69755
on Jul 22, 2026https://github.com/angular/angular/issues/69748#event-28320437832
pkozlowski-opensourcehttps://github.com/pkozlowski-opensource
on Jul 22, 2026https://github.com/angular/angular/issues/69748#event-28320441268
fix(zone.js): vitest patching of describe/it curried callshttps://github.com/angular/angular/commit/21c45a8e1e1f06ae07e9d7dd76f3c49b680abfc7
https://docs.github.com/articles/closing-issues-via-commit-messages
21c45a8https://github.com/angular/angular/commit/21c45a8e1e1f06ae07e9d7dd76f3c49b680abfc7
https://github.com/apps/angular-automatic-lock-bot
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Aug 22, 2026https://github.com/angular/angular/issues/69748#issuecomment-5376667696
automatic conversation locking policyhttps://github.com/angular/angular/blob/f0fbced1c55bc8b8ed9df01cea99df42f3e7eae3/contributing-docs/auto-issue-locking.md
angular-automatic-lock-bothttps://github.com/apps/angular-automatic-lock-bot
on Aug 22, 2026https://github.com/angular/angular/issues/69748#event-29833661988
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angular/issues/69748
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angular/issues/69748
hawkgshttps://github.com/hawkgs
area: zonesIssues related to zone.jshttps://github.com/angular/angular/issues?q=state%3Aopen%20label%3A%22area%3A%20zones%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.