build: upgrade jest to 30 - #3413
Conversation
jest/jest-environment-jsdom 29.6.4 -> 30.x, babel-jest 29.6.4 -> 30.4.1, ts-jest -> ^29.4.12 (supports jest 30; ts-jest 30 unpublished). Pulls in jsdom 26. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop jest-environment-jsdom-global (unused; peer capped at jest 29), @testing-library/react-hooks (unused; renderHook comes from RTL), and mutationobserver-shim (jsdom 26 has native MutationObserver). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@testing-library/jest-dom ^5.16 -> ^7 and @testing-library/dom ^8 -> ^10 to align with jest 30 / RTL 15 / jsdom 26 (jest-dom v7 requires node 22). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The jest global types (describe/it) were only present transitively before; removing the unused deps dropped @types/jest, breaking tsconfig types:[jest]. Pin it explicitly at ^30 to match jest 30. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jest 30 removed the alias matchers. toBeCalled -> toHaveBeenCalled and lastCalledWith -> toHaveBeenLastCalledWith across Disclosure, GridForm, and useDebouncedField tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The single-view config disabled the next CTA (last view), so jest-dom v7's accurate toHaveStyle read the disabled background. Add a second view so the next button is enabled and its primary variant is actually asserted. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jest 30 changed the snapshot header URL (goo.gl -> jestjs.io); no content drift. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
View your CI Pipeline Execution ↗ for commit 391e32c ☁️ Nx Cloud last updated this comment at |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| { | ||
| title: 'Multi view', | ||
| children: <>View 2</>, | ||
| primaryCta: { actionType: 'confirm', children: 'Done' }, | ||
| secondaryCta: { | ||
| actionType: 'cancel', | ||
| children: 'Cancel', | ||
| }, | ||
| }, |
There was a problem hiding this comment.
this seems out of place, why did this need to change?
There was a problem hiding this comment.
oh! it was a real test failure where the next button was disabled bc it was testing multiview with only one view. selling the jest bump with this one example!
|
📬 Published Alpha Packages:
|
|
🚀 Styleguide deploy preview ready! Preview URL: https://6a8766a2b5174d63d983bf96--gamut-preview.netlify.app |


Overview
Bumps Jest from
29.6.4→30.xacross the gamut monorepo, refreshes the testing-library family to match, and removes some dead jest-related deps. All tests and typechecks pass.Landed as focused commits:
jest/jest-environment-jsdom→ 30.x,babel-jest→ 30.4.1,ts-jest→^29.4.12(supports jest 30; ts-jest 30 isn't published yet). Pulls in jsdom 26.jest-environment-jsdom-global(peer capped at jest 29, unused),@testing-library/react-hooks(unused —renderHookcomes from RTL),mutationobserver-shim(jsdom 26 has nativeMutationObserver)@testing-library/jest-dom^5→^7,@testing-library/dom^8→^10@types/jest^30— jest global types were only present transitively beforetoBeCalled→toHaveBeenCalled,lastCalledWith→toHaveBeenLastCalledWithgoo.gl→jestjs.ioheader URL; no content driftBreaking changes addressed
expectmatcher aliases — jest 30 deleted them; migratedtoBeCalled/lastCalledWith.getComputedStylecanary tests and timer/rAF-heavy suites; no regressions.Prerequisites (already satisfied — no work needed)
^22.13.1— jest 30 dropped 14/16/19/21.5.9.3— above jest 30's new 5.4 minimum.@nx/jest@22.6.0already resolves jest 30 internals.PR Checklist
Testing instructions
Expected: all 9 projects green (1587 tests pass, 0 fail), typecheck clean, and a clean working tree afterward (no snapshot churn).
PR Links and Envs