preact-testing-library version
3.2.4 (latest)
preact version affected
11.0.0-beta.0 / 11.0.0-beta.1
Problem description
Preact 11 reached beta in September 2025 (11.0.0-beta.0 release notes, upgrade guide) and brings breaking changes that touch testing tooling:
- JSX namespace restructure (
HTMLAttributes / event types move from JSX.* to the top-level preact namespace).
useRef now requires an initial value.
- Refs forwarded by default;
forwardRef becomes a no-op.
- Hydration 2.0 —
<Suspense> children may now return zero or multiple DOM nodes.
- TypeScript ≥ 5.1 floor.
- IE11 dropped.
@testing-library/preact@3.2.4 declares peerDependencies.preact: ">=10 || ^10.0.0-alpha.0 || ^10.0.0-beta.0", so any consumer that bumps Preact to 11 gets a peer-dep warning at install time and no signal from the testing library about whether the underlying assertions still hold. Downstream third-party adapters (e.g. routers, UI kits) cannot ship Preact 11 support until this side of the matrix is verified.
What would help
A statement of intent or a tracking checklist here would be enough for downstream maintainers to plan around. Concretely:
- Widen
peerDependencies.preact to accept ^11.0.0-0 (or release a 4.x line targeting Preact 11 if a major bump is preferred).
- Run the existing test suite against the latest Preact 11 beta — the public API surface (
render, screen, fireEvent, act, cleanup, renderHook) doesn't obviously interact with any of the breaking changes, but act + Hydration 2.0 and the new ref-forwarding default are worth a spot check.
- Surface the result in a release (even a beta tag would unblock matrix testing for downstream libraries).
Context
Real-Router (@real-router/preact) is one such downstream — the adapter's source has been made forward-compatible with Preact 11's JSX-namespace restructure, but the test matrix is pinned to Preact 10 because
@testing-library/preact is the only blocker. See real-router#592 for the full audit.
Happy to open a draft PR (peer-dep bump + CI matrix entry) if that would be useful, once there's a signal on which direction is preferred (widen the existing 3.x line vs. cut a 4.x major).
preact-testing-libraryversion3.2.4 (latest)
preactversion affected11.0.0-beta.0 / 11.0.0-beta.1
Problem description
Preact 11 reached beta in September 2025 (11.0.0-beta.0 release notes, upgrade guide) and brings breaking changes that touch testing tooling:
HTMLAttributes/ event types move fromJSX.*to the top-levelpreactnamespace).useRefnow requires an initial value.forwardRefbecomes a no-op.<Suspense>children may now return zero or multiple DOM nodes.@testing-library/preact@3.2.4declarespeerDependencies.preact: ">=10 || ^10.0.0-alpha.0 || ^10.0.0-beta.0", so any consumer that bumps Preact to 11 gets a peer-dep warning at install time and no signal from the testing library about whether the underlying assertions still hold. Downstream third-party adapters (e.g. routers, UI kits) cannot ship Preact 11 support until this side of the matrix is verified.What would help
A statement of intent or a tracking checklist here would be enough for downstream maintainers to plan around. Concretely:
peerDependencies.preactto accept^11.0.0-0(or release a4.xline targeting Preact 11 if a major bump is preferred).render,screen,fireEvent,act,cleanup,renderHook) doesn't obviously interact with any of the breaking changes, butact+ Hydration 2.0 and the new ref-forwarding default are worth a spot check.Context
Real-Router (
@real-router/preact) is one such downstream — the adapter's source has been made forward-compatible with Preact 11's JSX-namespace restructure, but the test matrix is pinned to Preact 10 because@testing-library/preactis the only blocker. See real-router#592 for the full audit.Happy to open a draft PR (peer-dep bump + CI matrix entry) if that would be useful, once there's a signal on which direction is preferred (widen the existing 3.x line vs. cut a 4.x major).