Fix no-store test case (#41775)
<!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: --> x-ref: https://github.com/vercel/next.js/actions/runs/3319321225/jobs/5484439514
This commit is contained in:
parent
fe5a502d51
commit
e7f97c332e
2 changed files with 4 additions and 4 deletions
|
@ -221,7 +221,7 @@ function patchFetch(ComponentMod: any) {
|
|||
if (staticGenerationStore && isStaticGeneration) {
|
||||
if (init && typeof init === 'object') {
|
||||
if (init.cache === 'no-store') {
|
||||
staticGenerationStore.revalidate = 0
|
||||
staticGenerationStore.fetchRevalidate = 0
|
||||
// TODO: ensure this error isn't logged to the user
|
||||
// seems it's slipping through currently
|
||||
throw new DynamicServerError(
|
||||
|
|
|
@ -85,17 +85,17 @@ describe('app-dir static/dynamic handling', () => {
|
|||
expect(manifest.version).toBe(3)
|
||||
expect(manifest.routes).toEqual({
|
||||
'/blog/tim': {
|
||||
initialRevalidateSeconds: false,
|
||||
initialRevalidateSeconds: 10,
|
||||
srcRoute: '/blog/[author]',
|
||||
dataRoute: '/blog/tim.rsc',
|
||||
},
|
||||
'/blog/seb': {
|
||||
initialRevalidateSeconds: false,
|
||||
initialRevalidateSeconds: 10,
|
||||
srcRoute: '/blog/[author]',
|
||||
dataRoute: '/blog/seb.rsc',
|
||||
},
|
||||
'/blog/styfle': {
|
||||
initialRevalidateSeconds: false,
|
||||
initialRevalidateSeconds: 10,
|
||||
srcRoute: '/blog/[author]',
|
||||
dataRoute: '/blog/styfle.rsc',
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue