Skip to content

Commit

Permalink
Adjust expectations in ppr-full test
Browse files Browse the repository at this point in the history
  • Loading branch information
unstubbable committed Feb 23, 2025
1 parent 158bf76 commit e6dc534
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/e2e/app-dir/ppr-full/ppr-full.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ describe('ppr-full', () => {
expect(cacheControl).toEqual('no-store, must-revalidate')
} else if (dynamic === false || dynamic === 'force-static') {
expect(cacheControl).toEqual(
`s-maxage=${revalidate || '31536000'}, stale-while-revalidate`
revalidate === undefined
? `s-maxage=31536000`
: `s-maxage=${revalidate}, stale-while-revalidate=${31536000 - revalidate}`
)
} else {
expect(cacheControl).toEqual(
Expand Down Expand Up @@ -665,7 +667,9 @@ describe('ppr-full', () => {
)
} else {
expect(res.headers.get('cache-control')).toEqual(
`s-maxage=${revalidate || '31536000'}, stale-while-revalidate`
revalidate === undefined
? `s-maxage=31536000`
: `s-maxage=${revalidate}, stale-while-revalidate=${31536000 - revalidate}`
)
}

Expand Down

0 comments on commit e6dc534

Please sign in to comment.