npm / @testing-library/jest-dom
@testing-library/jest-dom
What changed in @testing-library/jest-dom 6 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
5 breaking4 new APIs and options2 tooling1 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@testing-library/jest-dom 82 changes
Breaking changes 1
Support for Vitest versions lower than 5 was removed; consumers must upgrade to a supported version.
Tooling 1
Support for Vitest 5 was added.
@testing-library/jest-dom 75 changes
Breaking changes 2
The minimum supported Node.js version is now 22.
Now required as a peer dependency.
New APIs and options 2
Adds the toContainAnyBy* query matchers.
Adds the toContainOneBy* query matchers.
Fixes and other changes 1
Declare vitest as an optional peer dependency.
@testing-library/jest-dom 65 changes
Breaking changes 2
The extend-expect script was removed; use the default import path or a test platform-specific import path instead.
Node versions below 14 are no longer supported.
New APIs and options 2
Import this path to automatically extend the expect instance for @jest/globals and augment its matcher interface.
Import this path to automatically extend the expect instance for vitest and augment its matcher interface.
Tooling 1
Types are provided locally, supporting jest, @jest/globals, and vitest.