diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 3294b4948..87346af69 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -45,7 +45,7 @@ async function writeWebResponse(res: http.ServerResponse, webResponse: Response) const { status, headers, body } = webResponse; res.writeHead(status, Object.fromEntries(headers.entries())); if (body) { - if(body instanceof Readable) { + if (body instanceof Readable) { body.pipe(res); return; } else { diff --git a/packages/astro/test/ssr-api-route.test.js b/packages/astro/test/ssr-api-route.test.js index cf053a8db..54991e80a 100644 --- a/packages/astro/test/ssr-api-route.test.js +++ b/packages/astro/test/ssr-api-route.test.js @@ -50,8 +50,8 @@ describe('API routes in SSR', () => { it('Can POST to API routes', async () => { const response = await fixture.fetch('/food.json', { method: 'POST', - body: `some data` - }) + body: `some data`, + }); expect(response.status).to.equal(200); const text = await response.text(); expect(text).to.equal(`ok`);