[ci] format

This commit is contained in:
Matt Kane 2025-01-16 12:41:39 +00:00 committed by astrobot-houston
parent bbf1d8894e
commit df90e6dfad
2 changed files with 6 additions and 3 deletions

View file

@ -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,

View file

@ -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);