Open lourd opened 2 months ago
Still happening on Nx v20, with Next.js 15 and @testing-library/react 16.0.1
Was there any resolution to this in the end? facing same on Nx v20, with Next.js 15?
Hey, thanks for filling out an issue!
It makes complete sense to hold off on making any significant updates until a stable release of React 19 is available, especially with core libraries like Next.js and React Testing Library not yet fully aligned in their version support. Given that React 19 RC may introduce breaking changes, integrating it prematurely could lead to unforeseen issues in testing and production environments.
For now, maintaining compatibility with React 18, which is stable and well-supported, is likely the best approach until the ecosystem catches up with stable React 19 support.
The new JSX transform has been out for 4 years, since React 17. The only thing new in React 19 is the warning that you're using the old transform. Upgrading the JSX transform used in whatever Jest preset/configuration is being used here can and should happen separately from upgrading to React 19.
Oh, I misunderstood. I think we should be able to address this although the warning is from React 19 RC which I hope isn't blocking you.
Current Behavior
When generating a new Next.js application or library, using the React 19 RC, and running the default generated test, there's a console warning:
I cannot figure out where the outdated transform is being specified - babel-jest, the @nx/next/babel preset, or the underlying next babel preset.
Expected Behavior
The new JSX transform should be used during tests
GitHub Repo
No response
Steps to Reproduce
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response