Files
Zack TannerandGitHub fd38d5bf15 segment cache: add test for passing unawaited promise to context provider (#89339)
Adds a failing test proving that if the RSC response from a prefetch
contains an unresolved promise, navigating to the page will cause the
Suspense boundary wrapping the use of that promise to remain in fallback
state indefinitely.

This appears to have regressed in
e9a03ac12c, though the theory is that this
is just uncovering a React bug rather than causing the issue.

Closes #89170
2026-02-21 10:29:09 -08:00

18 lines
493 B
TypeScript

import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils'
describe('prefetch-partial-rsc', () => {
const { next } = nextTestSetup({
files: __dirname,
})
it('resolves after a client-side navigation', async () => {
const browser = await next.browser('/')
await browser.elementByCss('#learn-link').click()
await retry(async () => {
const text = await browser.elementByCss('#user').text()
expect(text).toBe('user: Guest')
})
})
})