From df90e6dfad377e6b4a1cc5978a532cb6d417de25 Mon Sep 17 00:00:00 2001 From: Matt Kane Date: Thu, 16 Jan 2025 12:41:39 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/vite-plugin-astro-server/response.ts | 8 ++++++-- packages/astro/test/dev-routing.test.js | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro-server/response.ts b/packages/astro/src/vite-plugin-astro-server/response.ts index 753e77c66cb7..03b25be1a872 100644 --- a/packages/astro/src/vite-plugin-astro-server/response.ts +++ b/packages/astro/src/vite-plugin-astro-server/response.ts @@ -6,8 +6,8 @@ import type { ModuleLoader } from '../core/module-loader/index.js'; import { Readable } from 'node:stream'; import { getSetCookiesFromResponse } from '../core/cookies/index.js'; import { getViteErrorPayload } from '../core/errors/dev/index.js'; -import notFoundTemplate from '../template/4xx.js'; import { redirectTemplate } from '../core/routing/3xx.js'; +import notFoundTemplate from '../template/4xx.js'; export async function handle404Response( origin: string, @@ -54,7 +54,11 @@ export function writeHtmlResponse(res: http.ServerResponse, statusCode: number, res.end(); } -export function writeRedirectResponse(res: http.ServerResponse, statusCode: number, location: string) { +export function writeRedirectResponse( + res: http.ServerResponse, + statusCode: number, + location: string, +) { const html = redirectTemplate({ status: statusCode, location }); res.writeHead(statusCode, { Location: location, diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js index a43561769a1a..2f4b84bc5284 100644 --- a/packages/astro/test/dev-routing.test.js +++ b/packages/astro/test/dev-routing.test.js @@ -60,7 +60,6 @@ describe('Development Routing', () => { assert.equal(response.headers.get('Location'), '/'); }); - it('404 when loading invalid dynamic route', async () => { const response = await fixture.fetch('/2'); assert.equal(response.status, 404);