Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Jan 18, 2024
1 parent a4b696d commit 8bc3b66
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/core/routing/manifest/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
34 changes: 17 additions & 17 deletions packages/astro/test/units/routing/manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down

0 comments on commit 8bc3b66

Please sign in to comment.