test: add catchall path to route generation test

This commit is contained in:
Daniel Roe 2023-05-19 11:37:14 +01:00
parent 010b539edb
commit 71c3595169
2 changed files with 26 additions and 1 deletions

View File

@ -38,6 +38,12 @@ exports[`util: route util: route create createRoutes should allow snake case rou
"name": "subpage-param",
"path": "/subpage/:param?",
},
{
"chunkName": "pages/parent/_",
"component": "/some/nuxt/app/pages/parent/_.vue",
"name": "parent-all",
"path": "/parent/*",
},
{
"chunkName": "pages/index",
"component": "/some/nuxt/app/pages/index.vue",
@ -162,6 +168,15 @@ exports[`util: route util: route create createRoutes should enforce trailing sla
"strict": true,
},
},
{
"chunkName": "pages/parent/_",
"component": "/some/nuxt/app/pages/parent/_.vue",
"name": "parent-all",
"path": "/parent/*",
"pathToRegexpOptions": {
"strict": true,
},
},
{
"chunkName": "pages/index",
"component": "/some/nuxt/app/pages/index.vue",
@ -239,6 +254,15 @@ exports[`util: route util: route create createRoutes should remove trailing slas
"strict": true,
},
},
{
"chunkName": "pages/parent/_",
"component": "/some/nuxt/app/pages/parent/_.vue",
"name": "parent-all",
"path": "/parent/*",
"pathToRegexpOptions": {
"strict": true,
},
},
{
"chunkName": "pages/index",
"component": "/some/nuxt/app/pages/index.vue",

View File

@ -212,7 +212,8 @@ describe('util: route', () => {
'pages/another_route/_id.vue',
'pages/parent/index.vue',
'pages/parent/child/index.vue',
'pages/parent/child/test.vue'
'pages/parent/child/test.vue',
'pages/parent/_.vue'
]
const srcDir = '/some/nuxt/app'
const pagesDir = 'pages'