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

@@ -283,7 +283,9 @@ async function runProbe(probe, deploymentId, deploymentUrl, ctx) {
}
});
hadTest = true;
} else if (probe.notResponseHeaders) {
}
if (probe.notResponseHeaders) {
Object.keys(probe.notResponseHeaders).forEach(header => {
const headerValue = resp.headers.get(header);
const expected = probe.notResponseHeaders[header];