Files
Sebastian "Sebbie" SilbermannandGitHub 1226b5352a [test] Deflake legacy-link-behavior (#85805)
Suspense around body will trigger "missing tags" warning if something throws in the boundary. This error can come in slightly later and cause flaky test results.

Fixes
```
● Validations for <Link legacyBehavior> › When rendering from a Client Component › warns and throws an error if the child is lazy JSX
  
      expect(received).toMatchInlineSnapshot(snapshot)
  
      Snapshot name: `Validations for <Link legacyBehavior> When rendering from a Client Component warns and throws an error if the child is lazy JSX 1`
```
-- https://github.com/vercel/next.js/actions/runs/19097617827/job/54561506584#step:34:13256
2025-11-05 14:05:40 +01:00

25 lines
435 B
TypeScript

import { connection } from 'next/server'
import { ReactNode, Suspense } from 'react'
export default async function Root({
children,
}: {
children: React.ReactNode
}) {
return (
<html>
<body>
<Suspense>
<Connection>{children}</Connection>
</Suspense>
</body>
</html>
)
}
async function Connection({ children }: { children: ReactNode }) {
await connection()
return children
}