-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add cases for app router non-ascii paths
- Loading branch information
Showing
4 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
tests/fixtures/server-components/app/product/[slug]/page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
const Product = ({ params }) => ( | ||
<div> | ||
<h1>Product {decodeURI(params.slug)}</h1> | ||
<p> | ||
This page uses generateStaticParams() to prerender a Product | ||
<span data-testid="date-now">{new Date().toISOString()}</span> | ||
</p> | ||
</div> | ||
) | ||
|
||
export async function generateStaticParams() { | ||
return [ | ||
{ | ||
// Japanese prerendered (non-ascii) | ||
slug: '事前レンダリング', | ||
}, | ||
] | ||
} | ||
|
||
export default Product |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters