2019-01-29 19:23:42 +00:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
|
|
|
exports[`util: route util: route create createRoutes should allow snake case routes in posix system 1`] = `
|
2023-04-25 21:17:00 +00:00
|
|
|
[
|
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/index.vue",
|
|
|
|
"name": "parent",
|
|
|
|
"path": "/parent",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/snake_case_route",
|
|
|
|
"component": "/some/nuxt/app/pages/snake_case_route.vue",
|
|
|
|
"name": "snake_case_route",
|
|
|
|
"path": "/snake_case_route",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/child/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/index.vue",
|
|
|
|
"name": "parent-child",
|
|
|
|
"path": "/parent/child",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/child/test",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/test.vue",
|
|
|
|
"name": "parent-child-test",
|
|
|
|
"path": "/parent/child/test",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/another_route/_id",
|
|
|
|
"component": "/some/nuxt/app/pages/another_route/_id.vue",
|
2020-12-17 13:34:53 +00:00
|
|
|
"name": "another_route-id",
|
2019-01-29 19:23:42 +00:00
|
|
|
"path": "/another_route/:id?",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/subpage/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/subpage/_param.vue",
|
|
|
|
"name": "subpage-param",
|
|
|
|
"path": "/subpage/:param?",
|
|
|
|
},
|
2023-05-19 10:37:14 +00:00
|
|
|
{
|
|
|
|
"chunkName": "pages/parent/_",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/_.vue",
|
|
|
|
"name": "parent-all",
|
|
|
|
"path": "/parent/*",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/index",
|
|
|
|
"component": "/some/nuxt/app/pages/index.vue",
|
|
|
|
"name": "index",
|
|
|
|
"path": "/",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/_param.vue",
|
|
|
|
"name": "param",
|
|
|
|
"path": "/:param",
|
|
|
|
},
|
|
|
|
]
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`util: route util: route create createRoutes should allow snake case routes in windows system 1`] = `
|
2023-04-25 21:17:00 +00:00
|
|
|
[
|
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/index",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\parent\\\\index.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "parent",
|
|
|
|
"path": "/parent",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/snake_case_route",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\snake_case_route.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "snake_case_route",
|
|
|
|
"path": "/snake_case_route",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/child/index",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\parent\\\\child\\\\index.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "parent-child",
|
|
|
|
"path": "/parent/child",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/parent/child/test",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\parent\\\\child\\\\test.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "parent-child-test",
|
|
|
|
"path": "/parent/child/test",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/another_route/_id",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\another_route\\\\_id.vue",
|
2020-12-17 13:34:53 +00:00
|
|
|
"name": "another_route-id",
|
2019-01-29 19:23:42 +00:00
|
|
|
"path": "/another_route/:id?",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/subpage/_param",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\subpage\\\\_param.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "subpage-param",
|
|
|
|
"path": "/subpage/:param?",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/index",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\index.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "index",
|
|
|
|
"path": "/",
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-01-29 19:23:42 +00:00
|
|
|
"chunkName": "pages/_param",
|
2023-04-25 21:17:00 +00:00
|
|
|
"component": "\\\\\\\\some\\\\nuxt\\\\app\\\\pages\\\\_param.vue",
|
2019-01-29 19:23:42 +00:00
|
|
|
"name": "param",
|
|
|
|
"path": "/:param",
|
|
|
|
},
|
|
|
|
]
|
|
|
|
`;
|
2019-09-01 14:37:25 +00:00
|
|
|
|
|
|
|
exports[`util: route util: route create createRoutes should enforce trailing slashes when configured to 1`] = `
|
2023-04-25 21:17:00 +00:00
|
|
|
[
|
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/index.vue",
|
|
|
|
"name": "parent",
|
|
|
|
"path": "/parent/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/snake_case_route",
|
|
|
|
"component": "/some/nuxt/app/pages/snake_case_route.vue",
|
|
|
|
"name": "snake_case_route",
|
|
|
|
"path": "/snake_case_route/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/child/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/index.vue",
|
|
|
|
"name": "parent-child",
|
|
|
|
"path": "/parent/child/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/child/test",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/test.vue",
|
|
|
|
"name": "parent-child-test",
|
|
|
|
"path": "/parent/child/test/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/another_route/_id",
|
|
|
|
"component": "/some/nuxt/app/pages/another_route/_id.vue",
|
|
|
|
"name": "another_route-id",
|
|
|
|
"path": "/another_route/:id?/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/subpage/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/subpage/_param.vue",
|
|
|
|
"name": "subpage-param",
|
|
|
|
"path": "/subpage/:param?/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-05-19 10:37:14 +00:00
|
|
|
{
|
|
|
|
"chunkName": "pages/parent/_",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/_.vue",
|
|
|
|
"name": "parent-all",
|
|
|
|
"path": "/parent/*",
|
|
|
|
"pathToRegexpOptions": {
|
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/index",
|
|
|
|
"component": "/some/nuxt/app/pages/index.vue",
|
|
|
|
"name": "index",
|
|
|
|
"path": "/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/_param.vue",
|
|
|
|
"name": "param",
|
|
|
|
"path": "/:param/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`util: route util: route create createRoutes should remove trailing slashes when configured to 1`] = `
|
2023-04-25 21:17:00 +00:00
|
|
|
[
|
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/index.vue",
|
|
|
|
"name": "parent",
|
|
|
|
"path": "/parent",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/snake_case_route",
|
|
|
|
"component": "/some/nuxt/app/pages/snake_case_route.vue",
|
|
|
|
"name": "snake_case_route",
|
|
|
|
"path": "/snake_case_route",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/child/index",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/index.vue",
|
|
|
|
"name": "parent-child",
|
|
|
|
"path": "/parent/child",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/parent/child/test",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/child/test.vue",
|
|
|
|
"name": "parent-child-test",
|
|
|
|
"path": "/parent/child/test",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/another_route/_id",
|
|
|
|
"component": "/some/nuxt/app/pages/another_route/_id.vue",
|
2020-12-17 13:34:53 +00:00
|
|
|
"name": "another_route-id",
|
2019-09-01 14:37:25 +00:00
|
|
|
"path": "/another_route/:id?",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/subpage/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/subpage/_param.vue",
|
|
|
|
"name": "subpage-param",
|
|
|
|
"path": "/subpage/:param?",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-05-19 10:37:14 +00:00
|
|
|
{
|
|
|
|
"chunkName": "pages/parent/_",
|
|
|
|
"component": "/some/nuxt/app/pages/parent/_.vue",
|
|
|
|
"name": "parent-all",
|
|
|
|
"path": "/parent/*",
|
|
|
|
"pathToRegexpOptions": {
|
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-10-08 08:48:52 +00:00
|
|
|
"chunkName": "pages/index",
|
|
|
|
"component": "/some/nuxt/app/pages/index.vue",
|
|
|
|
"name": "index",
|
|
|
|
"path": "/",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-10-08 08:48:52 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
2023-04-25 21:17:00 +00:00
|
|
|
{
|
2019-09-01 14:37:25 +00:00
|
|
|
"chunkName": "pages/_param",
|
|
|
|
"component": "/some/nuxt/app/pages/_param.vue",
|
|
|
|
"name": "param",
|
|
|
|
"path": "/:param",
|
2023-04-25 21:17:00 +00:00
|
|
|
"pathToRegexpOptions": {
|
2019-09-01 14:37:25 +00:00
|
|
|
"strict": true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
]
|
|
|
|
`;
|