Unverified Commit 1c821e2d authored by Benjamin Woodruff ‮'s avatar Benjamin Woodruff Committed by GitHub
parent 8619c015
...@@ -78,6 +78,22 @@ describe('empty-generate-static-params', () => { ...@@ -78,6 +78,22 @@ describe('empty-generate-static-params', () => {
11 | } 11 | }
12 | 12 |
> "
`)
} else if (isNextDeploy) {
// Vercel build logs omit leading indentation from stack and code frames.
expect(block).toMatchInlineSnapshot(`
"When using Cache Components, all \`generateStaticParams\` functions must return at least one result. This is to ensure that we can perform build-time validation that there is no other dynamic accesses that would cause a runtime error.
Learn more: https://nextjs.org/docs/messages/empty-generate-static-params
at generateStaticParams (webpack:///app/[slug]/page.tsx:10:10)
8 |
9 | export async function generateStaticParams() {
> 10 | return []
| ^
11 | }
12 |
> " > "
`) `)
} else if (isTurbopack) { } else if (isTurbopack) {
...@@ -144,6 +160,23 @@ describe('empty-generate-static-params', () => { ...@@ -144,6 +160,23 @@ describe('empty-generate-static-params', () => {
11 | // factory stack anchored at the declaration. 11 | // factory stack anchored at the declaration.
12 | const items: string[] = [] 12 | const items: string[] = []
> "
`)
} else if (isNextDeploy) {
// Vercel build logs omit leading indentation from stack and code frames.
expect(block).toMatchInlineSnapshot(`
"When using Cache Components, all \`generateStaticParams\` functions must return at least one result. This is to ensure that we can perform build-time validation that there is no other dynamic accesses that would cause a runtime error.
Learn more: https://nextjs.org/docs/messages/empty-generate-static-params
at generateStaticParams (webpack:///app/computed/[slug]/page.tsx:9:8)
7 | }
8 |
> 9 | export async function generateStaticParams() {
| ^
10 | // Empty at runtime but not statically analyzable, so it falls back to the
11 | // factory stack anchored at the declaration.
12 | const items: string[] = []
> " > "
`) `)
} else if (isTurbopack) { } else if (isTurbopack) {
......
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