Unverified Commit e7f97c33 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

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
parent fe5a502d
...@@ -221,7 +221,7 @@ function patchFetch(ComponentMod: any) { ...@@ -221,7 +221,7 @@ function patchFetch(ComponentMod: any) {
if (staticGenerationStore && isStaticGeneration) { if (staticGenerationStore && isStaticGeneration) {
if (init && typeof init === 'object') { if (init && typeof init === 'object') {
if (init.cache === 'no-store') { if (init.cache === 'no-store') {
staticGenerationStore.revalidate = 0 staticGenerationStore.fetchRevalidate = 0
// TODO: ensure this error isn't logged to the user // TODO: ensure this error isn't logged to the user
// seems it's slipping through currently // seems it's slipping through currently
throw new DynamicServerError( throw new DynamicServerError(
......
...@@ -85,17 +85,17 @@ describe('app-dir static/dynamic handling', () => { ...@@ -85,17 +85,17 @@ describe('app-dir static/dynamic handling', () => {
expect(manifest.version).toBe(3) expect(manifest.version).toBe(3)
expect(manifest.routes).toEqual({ expect(manifest.routes).toEqual({
'/blog/tim': { '/blog/tim': {
initialRevalidateSeconds: false, initialRevalidateSeconds: 10,
srcRoute: '/blog/[author]', srcRoute: '/blog/[author]',
dataRoute: '/blog/tim.rsc', dataRoute: '/blog/tim.rsc',
}, },
'/blog/seb': { '/blog/seb': {
initialRevalidateSeconds: false, initialRevalidateSeconds: 10,
srcRoute: '/blog/[author]', srcRoute: '/blog/[author]',
dataRoute: '/blog/seb.rsc', dataRoute: '/blog/seb.rsc',
}, },
'/blog/styfle': { '/blog/styfle': {
initialRevalidateSeconds: false, initialRevalidateSeconds: 10,
srcRoute: '/blog/[author]', srcRoute: '/blog/[author]',
dataRoute: '/blog/styfle.rsc', dataRoute: '/blog/styfle.rsc',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment