summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar tony-sull <tony-sull@users.noreply.github.com> 2022-05-18 20:10:07 +0000
committerGravatar github-actions[bot] <github-actions[bot]@users.noreply.github.com> 2022-05-18 20:10:07 +0000
commitf1d7d543b0038d2d6218acdd42ffaf61e9480b13 (patch)
tree01341592ca47f11cc2a99396cd60a82e9f944d67
parent0d3c673dd9d9431bf6e6a88c448e324033f7f2f7 (diff)
downloadastro-f1d7d543b0038d2d6218acdd42ffaf61e9480b13.tar.gz
astro-f1d7d543b0038d2d6218acdd42ffaf61e9480b13.tar.zst
astro-f1d7d543b0038d2d6218acdd42ffaf61e9480b13.zip
[ci] format
-rw-r--r--packages/astro/src/vite-plugin-astro-server/index.ts7
-rw-r--r--packages/astro/test/dev-routing.test.js2
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts
index b71878079..506f54a3f 100644
--- a/packages/astro/src/vite-plugin-astro-server/index.ts
+++ b/packages/astro/src/vite-plugin-astro-server/index.ts
@@ -194,9 +194,10 @@ async function handleRequest(
// When file-based build format is used, pages will be built to `/blog.html`
// rather than `/blog/index.html`. The dev server should handle this as well
// to match production deployments.
- const url = config.build.format === 'file'
- ? new URL(origin + req.url?.replace(/(index)?\.html$/, ''))
- : new URL(origin + req.url);
+ const url =
+ config.build.format === 'file'
+ ? new URL(origin + req.url?.replace(/(index)?\.html$/, ''))
+ : new URL(origin + req.url);
const pathname = decodeURI(url.pathname);
const rootRelativeUrl = pathname.substring(devRoot.length - 1);
if (!buildingToSSR) {
diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js
index de765a183..13ea4d12f 100644
--- a/packages/astro/test/dev-routing.test.js
+++ b/packages/astro/test/dev-routing.test.js
@@ -289,7 +289,7 @@ describe('Development Routing', () => {
const response = await fixture.fetch('/1.html');
expect(response.status).to.equal(200);
});
-
+
it('200 when loading /1', async () => {
const response = await fixture.fetch('/1');
expect(response.status).to.equal(200);