Skip to content

Commit

Permalink
Fix no-store test case (#41775)
Browse files Browse the repository at this point in the history
<!--
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
  • Loading branch information
ijjk committed Oct 25, 2022
1 parent fe5a502 commit e7f97c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/next/server/app-render.tsx
Expand Up @@ -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(
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/app-dir/app-static.test.ts
Expand Up @@ -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',
},
Expand Down

0 comments on commit e7f97c3

Please sign in to comment.