tests: added tests for PPR (#10808)

This adds some tests to the PPR implementation for Next.js. This also
fixes a bug where the static pages were incorrectly generating a header
that falsly indicated that it postponed.
This commit is contained in:
Wyatt Johnson
2023-11-08 09:21:51 -07:00
committed by GitHub
parent 2bd9216403
commit fd29b966d3
17 changed files with 324 additions and 2 deletions

View File

@@ -2429,7 +2429,8 @@ export const onPrerenderRoute =
initialHeaders: {
'content-type': rscContentTypeHeader,
vary: rscVaryHeader,
...(experimentalPPR && rscDidPostponeHeader
// If it contains a pre-render, then it was postponed.
...(prerender && rscDidPostponeHeader
? { [rscDidPostponeHeader]: '1' }
: {}),
},