Skip to content

Commit 71c3595

Browse files
committedMay 19, 2023
test: add catchall path to route generation test
1 parent 010b539 commit 71c3595

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed
 

‎packages/utils/test/__snapshots__/route.test.js.snap

+24
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ exports[`util: route util: route create createRoutes should allow snake case rou
3838
"name": "subpage-param",
3939
"path": "/subpage/:param?",
4040
},
41+
{
42+
"chunkName": "pages/parent/_",
43+
"component": "/some/nuxt/app/pages/parent/_.vue",
44+
"name": "parent-all",
45+
"path": "/parent/*",
46+
},
4147
{
4248
"chunkName": "pages/index",
4349
"component": "/some/nuxt/app/pages/index.vue",
@@ -162,6 +168,15 @@ exports[`util: route util: route create createRoutes should enforce trailing sla
162168
"strict": true,
163169
},
164170
},
171+
{
172+
"chunkName": "pages/parent/_",
173+
"component": "/some/nuxt/app/pages/parent/_.vue",
174+
"name": "parent-all",
175+
"path": "/parent/*",
176+
"pathToRegexpOptions": {
177+
"strict": true,
178+
},
179+
},
165180
{
166181
"chunkName": "pages/index",
167182
"component": "/some/nuxt/app/pages/index.vue",
@@ -239,6 +254,15 @@ exports[`util: route util: route create createRoutes should remove trailing slas
239254
"strict": true,
240255
},
241256
},
257+
{
258+
"chunkName": "pages/parent/_",
259+
"component": "/some/nuxt/app/pages/parent/_.vue",
260+
"name": "parent-all",
261+
"path": "/parent/*",
262+
"pathToRegexpOptions": {
263+
"strict": true,
264+
},
265+
},
242266
{
243267
"chunkName": "pages/index",
244268
"component": "/some/nuxt/app/pages/index.vue",

‎packages/utils/test/route.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,8 @@ describe('util: route', () => {
212212
'pages/another_route/_id.vue',
213213
'pages/parent/index.vue',
214214
'pages/parent/child/index.vue',
215-
'pages/parent/child/test.vue'
215+
'pages/parent/child/test.vue',
216+
'pages/parent/_.vue'
216217
]
217218
const srcDir = '/some/nuxt/app'
218219
const pagesDir = 'pages'

0 commit comments

Comments
 (0)
Please sign in to comment.