Skip to content

Commit

Permalink
update snapshot
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Mar 19, 2024
1 parent 9e7eb83 commit e38b693
Showing 1 changed file with 48 additions and 26 deletions.
74 changes: 48 additions & 26 deletions test/e2e/app-dir/app-static/app-static.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,33 +522,35 @@ createNextDescribe(
})

if (isNextStart) {
it('should have deterministic etag across revalidates', async () => {
const initialRes = await next.fetch(
'/variable-revalidate-stable/revalidate-3'
)
expect(initialRes.status).toBe(200)

// check 2 revalidate passes to ensure it's consistent
for (let i = 0; i < 2; i++) {
let startIdx = next.cliOutput.length

await retry(
async () => {
const res = await next.fetch(
'/variable-revalidate-stable/revalidate-3'
)
expect(next.cliOutput.substring(startIdx)).toContain(
'rendering /variable-revalidate-stable'
)
expect(initialRes.headers.get('etag')).toBe(
res.headers.get('etag')
)
},
12_000,
3_000
if (!process.env.__NEXT_EXPERIMENTAL_PPR) {
it('should have deterministic etag across revalidates', async () => {
const initialRes = await next.fetch(
'/variable-revalidate-stable/revalidate-3'
)
}
})
expect(initialRes.status).toBe(200)

// check 2 revalidate passes to ensure it's consistent
for (let i = 0; i < 2; i++) {
let startIdx = next.cliOutput.length

await retry(
async () => {
const res = await next.fetch(
'/variable-revalidate-stable/revalidate-3'
)
expect(next.cliOutput.substring(startIdx)).toContain(
'rendering /variable-revalidate-stable'
)
expect(initialRes.headers.get('etag')).toBe(
res.headers.get('etag')
)
},
12_000,
3_000
)
}
})
}

it('should output HTML/RSC files for static paths', async () => {
const files = (
Expand Down Expand Up @@ -761,6 +763,10 @@ createNextDescribe(
"variable-revalidate-edge/post-method/page_client-reference-manifest.js",
"variable-revalidate-edge/revalidate-3/page.js",
"variable-revalidate-edge/revalidate-3/page_client-reference-manifest.js",
"variable-revalidate-stable/revalidate-3.html",
"variable-revalidate-stable/revalidate-3.rsc",
"variable-revalidate-stable/revalidate-3/page.js",
"variable-revalidate-stable/revalidate-3/page_client-reference-manifest.js",
"variable-revalidate/authorization.html",
"variable-revalidate/authorization.rsc",
"variable-revalidate/authorization/page.js",
Expand Down Expand Up @@ -1473,6 +1479,22 @@ createNextDescribe(
"initialRevalidateSeconds": 3,
"srcRoute": "/variable-config-revalidate/revalidate-3",
},
"/variable-revalidate-stable/revalidate-3": {
"dataRoute": "/variable-revalidate-stable/revalidate-3.rsc",
"experimentalBypassFor": [
{
"key": "Next-Action",
"type": "header",
},
{
"key": "content-type",
"type": "header",
"value": "multipart/form-data",
},
],
"initialRevalidateSeconds": 3,
"srcRoute": "/variable-revalidate-stable/revalidate-3",
},
"/variable-revalidate/authorization": {
"dataRoute": "/variable-revalidate/authorization.rsc",
"experimentalBypassFor": [
Expand Down

0 comments on commit e38b693

Please sign in to comment.