Files
Zack TannerandGitHub 9c053332cc [test]: convert prefetching tests to be segmentCache compatible (#84521)
Refactors some older prefetching tests to be compatible with
`clientSegmentCache`. The old tests were too tightly coupled to router
implementation details. Some of the ones that don't make sense to
convert were removed (for ex, asserting on prefetch cache seeding
behavior, or fetch priority of "high", as fetch priority is managed
differently with the new router).

This refactors the tests to leverage the `act` util from `segment-cache`
test suites, and implemented the accordion behavior to more granularly
control when prefetches are dispatched. I copied those implementations
for now since we don't have a global util for it.
2025-10-06 12:12:11 -07:00

23 lines
491 B
JavaScript

import Link from 'next/link'
export const revalidate = 0
async function getData() {
await new Promise((resolve) => setTimeout(resolve, 3000))
return {
message: 'Welcome to the dashboard',
}
}
export default async function DashboardPage(props) {
const { message } = await getData()
return (
<>
<p id="dashboard-page">{message} [dashboard-prefetch-sentinel]</p>
<Link href="/static-page" id="to-static-page">
To Static Page
</Link>
</>
)
}