From f432acd34f8ca89951225b29898c538a50a63088 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Wed, 3 Jun 2020 11:25:47 -0500 Subject: [PATCH] Update rewrite dynamic SSG error --- packages/next/next-server/server/render.tsx | 4 +--- test/integration/prerender/test/index.test.js | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/next/next-server/server/render.tsx b/packages/next/next-server/server/render.tsx index c093511e6f588..187e8841a058a 100644 --- a/packages/next/next-server/server/render.tsx +++ b/packages/next/next-server/server/render.tsx @@ -383,9 +383,7 @@ export async function renderToHTML( `Rewrites don't support${ isFallback ? ' ' : ' auto-exported ' }dynamic pages${isFallback ? ' with getStaticProps ' : ' '}yet. ` + - `Using this will cause the page to fail to parse the params on the client${ - isFallback ? ' for the fallback page ' : '' - }` + `Using this will cause the page to fail to parse the params on the client` ) } diff --git a/test/integration/prerender/test/index.test.js b/test/integration/prerender/test/index.test.js index 7938590878262..393da10f468dd 100644 --- a/test/integration/prerender/test/index.test.js +++ b/test/integration/prerender/test/index.test.js @@ -557,12 +557,11 @@ const runTests = (dev = false, isEmulatedServerless = false) => { } if (dev) { - // TODO: re-enable when this is supported in dev - it.skip('should show error when rewriting to dynamic SSG page', async () => { + it('should show error when rewriting to dynamic SSG page', async () => { const item = Math.round(Math.random() * 100) const html = await renderViaHTTP(appPort, `/some-rewrite/${item}`) expect(html).toContain( - `Rewrites don't support dynamic pages with getStaticProps yet. Using this will cause the page to fail to parse the params on the client for the fallback page` + `Rewrites don't support dynamic pages with getStaticProps yet. Using this will cause the page to fail to parse the params on the client` ) })