-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Snapshot tests failing for React 19 #15402
Comments
As a hotfix, you can add overrides to your package.json
The issue is related to react changing the This is a bit tricky for Jest as updating the Maybe updating typeof val === 'object' &&
val != null &&
(
ReactIs.isElement(val) ||
val.$$typeof === Symbol.for('react.element') // Compatibility with react <19
) will solve the issue? But I am not sure if there are more use-cases, that can break. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
Leaving a comment to remove stale label |
Version
29.7.0
Steps to reproduce
Clone repo:
git clone https://github.com/remarkablemark/html-react-parser.git cd html-react-parser git checkout build/package
Install deps:
Run tests:
npm test
See remarkablemark/html-react-parser#1629 (comment)
Expected behavior
Snapshot tests without issues
Actual behavior
Snapshot tests failing for React 19:
Additional context
No response
Environment
The text was updated successfully, but these errors were encountered: