Change8

v30.0.0-beta.3

Breaking Changes
📦 jestView on GitHub →
1 breaking1 features🐛 11 fixes🔧 9 symbols

Summary

Jest 30 drops Node 16 support, updates jsdom to v26, mitigates memory leaks, and introduces a new ArrayOf matcher while fixing numerous bugs.

⚠️ Breaking Changes

  • Dropped support for Node.js version 16. Projects must upgrade to Node.js >=18 to use Jest 30.

Migration Steps

  1. Upgrade your runtime to Node.js >=18, as Jest 30 no longer supports Node 16.
  2. If you pin jsdom version, update it to ^26.0.0 or later.
  3. Run your test suite after upgrading to identify any regressions caused by the dropped Node 16 support.
  4. Review any custom jest-haste-map configurations for compatibility with the new handling of multiple configs.

✨ New Features

  • Added ArrayOf asymmetric matcher to expect (feat(expect): add ArrayOf).

🐛 Bug Fixes

  • Pass resolve conditions when loading stub module.
  • Refactor _importCoreModule so required core module is consistent.
  • Fix error cause bug.
  • Ignore Window object in deepCyclicCopyReplaceable.
  • jest-haste-map: Fix clobbering/errors when multiple configs use different haste implementations.
  • Print AggregateError to display correctly.
  • Prevent EPERM windows transform issue from failing tests.
  • objectContaining: Fixed bug where ObjectContaining matched with non-object values.
  • Fixed calledWith(objectContaining) when there are multiple calls.
  • jest-circus shares events among imports.
  • Fix worker state handling.

🔧 Affected Symbols

_importCoreModulejest-environment-nodejest-haste-mapobjectContainingcalledWithexpect.ArrayOfAggregateErrordeepCyclicCopyReplaceableworker