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:
JJ Kasper 2022-10-25 02:05:48 -07:00 committed by GitHub
parent fe5a502d51
commit e7f97c332e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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(

View file

@ -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',
},