``` function Suspender() { throw new Promise(() => null); return null; } render(<Suspender />) screen.debug() ``` This logs: ``` console.log <body> <div /> </body> ``` It's missing the error: > [A React component suspended while rendering, but no fallback UI was specified](https://stackoverflow.com/questions/54432861/a-react-component-suspended-while-rendering-but-no-fallback-ui-was-specified) In a "real" (non test) environment, you get this warning. Ideally test semantics match the real semantics.
Activity
eps1lon commentedon Apr 12, 2022
This behavior changed in React 18. There is no longer a warning when there's no Suspense boundary: https://codesandbox.io/s/missing-suspense-is-fine-ir1jl4
I'll double-check if that's intended by React and just forgotten in the changelog. But it's nothing we can do on our side.
eps1lon commentedon Apr 12, 2022
Intentionally changed in facebook/react#23267