Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 82355d7

Browse files
authored
test: adjust assertions to work with validateRSCRequestHeaders enabled (#2985)
1 parent 3acf9d3 commit 82355d7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

‎tests/e2e/edge-middleware.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,11 @@ test.describe('RSC cache poisoning', () => {
373373
test('Middleware rewrite', async ({ page, middleware }) => {
374374
const prefetchResponsePromise = new Promise<Response>((resolve) => {
375375
page.on('response', (response) => {
376-
if (response.url().includes('/test/rewrite-to-cached-page')) {
376+
if (
377+
(response.url().includes('/test/rewrite-to-cached-page') ||
378+
response.url().includes('/caching-rewrite-target')) &&
379+
response.status() === 200
380+
) {
377381
resolve(response)
378382
}
379383
})
@@ -400,7 +404,7 @@ test.describe('RSC cache poisoning', () => {
400404
test('Middleware redirect', async ({ page, middleware }) => {
401405
const prefetchResponsePromise = new Promise<Response>((resolve) => {
402406
page.on('response', (response) => {
403-
if (response.url().includes('/caching-redirect-target')) {
407+
if (response.url().includes('/caching-redirect-target')&&response.status()===200) {
404408
resolve(response)
405409
}
406410
})

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /