Skip to content

Commit

Permalink
replace to customRoutes option
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Nov 26, 2022
1 parent 103cd89 commit 7f4d4c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions test/pages/custom_route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ describe.each([
describe.each([
{
case: 'simple',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
path: '/about',
Expand All @@ -141,7 +141,7 @@ describe.each([
},
{
case: 'dynamic route',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
name: 'articles-name',
Expand All @@ -153,7 +153,7 @@ describe.each([
},
{
case: 'with definePageMeta',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
path: '/about',
Expand All @@ -164,7 +164,7 @@ describe.each([
},
{
case: 'JavaScript',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
path: '/about',
Expand Down
2 changes: 1 addition & 1 deletion test/pages/ignore_route/disable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ describe.each([
describe.each([
{
case: 'basic',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
path: '/about',
Expand Down
4 changes: 2 additions & 2 deletions test/pages/ignore_route/pick.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ describe.each([
describe.each([
{
case: 'simple',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
path: '/about',
Expand All @@ -169,7 +169,7 @@ describe.each([
},
{
case: 'dynamic route',
options: getNuxtOptions({}, true),
options: getNuxtOptions({}, 'page'),
pages: [
{
name: 'articles-name',
Expand Down
4 changes: 2 additions & 2 deletions test/pages/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ export type NuxtPage = ExtractArrayType<Parameters<NuxtHooks['pages:extend']>[0]

export function getNuxtOptions(
pages: Required<NuxtI18nOptions>['pages'],
parsePages = false,
customRoutes: Required<NuxtI18nOptions>['customRoutes'] = 'config',
defaultLocale = 'en'
): NuxtI18nOptions {
return {
parsePages,
customRoutes,
pages,
defaultLocale,
strategy: 'prefix_except_default',
Expand Down

0 comments on commit 7f4d4c0

Please sign in to comment.