Skip to content

Commit

Permalink
test: add cases for page router non-ascii paths and cache tags
Browse files Browse the repository at this point in the history
  • Loading branch information
pieh committed Oct 4, 2024
1 parent 451a20c commit 277bc04
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/e2e/page-router.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,22 @@ test.describe('Simple Page Router (no basePath, no i18n)', () => {
revalidateApiBasePath: '/api/revalidate-no-await',
expectedH1Content: 'Product not-prerendered-and-not-awaited-revalidation',
},
{
label:
'prerendered page with dynamic path and awaited res.revalidate() - non-ASCII variant',
prerendered: true,
pagePath: '/products/事前レンダリング',
revalidateApiBasePath: '/api/revalidate',
expectedH1Content: 'Product 事前レンダリング',
},
{
label:
'not prerendered page with dynamic path and awaited res.revalidate() - non-ASCII variant',
prerendered: false,
pagePath: '/products/事前レンダリングされていない',
revalidateApiBasePath: '/api/revalidate',
expectedH1Content: 'Product 事前レンダリングされていない',
},
]) {
test(label, async ({ page, pollUntilHeadersMatch, pageRouter }) => {
// in case there is retry or some other test did hit that path before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ export const getStaticPaths = () => {
},
locale: 'de',
},
{
params: {
// Japanese prerendered (non-ascii)
slug: '事前レンダリング',
},
},
],
fallback: 'blocking', // false or "blocking"
}
Expand Down

0 comments on commit 277bc04

Please sign in to comment.