-
Notifications
You must be signed in to change notification settings - Fork 49.3k
Closed
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug
Description
React version: 19
Steps To Reproduce
import assert = require("node:assert");
import { create } from "react-test-renderer";
const testRenderer = create(<div />);
try {
assert(testRenderer.toJSON(), "JSON should not be null");
} catch (error) {
console.error(error);
}
try {
assert(testRenderer.toTree(), "Tree should not be null");
} catch (error) {
console.error(error);
}
Link to code example:
https://codesandbox.io/p/devbox/elegant-kepler-224hrz?workspaceId=ws_AUrTGk3RTnAN4nJ64LUUVP
The current behavior
When migrating to React 19 then react-test-renderer
always renders null
and the root
has no children.
The expected behavior
When migrating to React 19 then react-test-renderer
should still render and the root
should have children.
cxp723, Karthikraju7 and stas3112ruscxp723
Metadata
Metadata
Assignees
Labels
Status: UnconfirmedA potential issue that we haven't yet confirmed as a bugA potential issue that we haven't yet confirmed as a bug