0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-31 23:31:30 -05:00

[ci] format

This commit is contained in:
Luiz Ferraz 2024-01-18 18:01:46 +00:00 committed by astrobot-houston
parent a4b696def3
commit 8bc3b66d4d
2 changed files with 18 additions and 18 deletions

View file

@ -197,7 +197,7 @@ function routeComparator(a: ManifestRouteData, b: ManifestRouteData) {
// For sorting purposes, an index route is considered to have one more segment than the URL it represents.
const aLength = a.isIndex ? a.segments.length + 1 : a.segments.length;
const bLength = b.isIndex ? b.segments.length + 1 : b.segments.length;
// Sort more specific routes before less specific routes
if (aLength !== bLength) {
return aLength > bLength ? -1 : 1;

View file

@ -129,23 +129,23 @@ describe('routing - createRouteManifest', () => {
});
expect(getManifestRoutes(manifest)).to.deep.equal([
{
"route": "/",
"type": "page",
},
{
"route": "/static",
"type": "page",
},
{
"route": "/[dynamic]",
"type": "page",
},
{
"route": "/[...rest]",
"type": "page",
},
]);
{
route: '/',
type: 'page',
},
{
route: '/static',
type: 'page',
},
{
route: '/[dynamic]',
type: 'page',
},
{
route: '/[...rest]',
type: 'page',
},
]);
});
it('injected routes are sorted in legacy mode above filesystem routes', async () => {