From a36d51d433af48c0859840bd468d3a6af65b0b0a Mon Sep 17 00:00:00 2001 From: matthewp Date: Wed, 14 Sep 2022 11:59:49 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/vite-plugin-astro-server/index.ts | 2 +- packages/astro/test/api-routes.test.js | 2 +- packages/astro/test/ssr-api-route.test.js | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 05e82a226c..e0ca6f07f5 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -217,7 +217,7 @@ async function handleRequest( if (!(req.method === 'GET' || req.method === 'HEAD')) { let bytes: Uint8Array[] = []; await new Promise((resolve) => { - req.on('data', part => { + req.on('data', (part) => { bytes.push(part); }); req.on('end', resolve); diff --git a/packages/astro/test/api-routes.test.js b/packages/astro/test/api-routes.test.js index 15d79d7f76..a911de3327 100644 --- a/packages/astro/test/api-routes.test.js +++ b/packages/astro/test/api-routes.test.js @@ -2,7 +2,7 @@ import { expect } from 'chai'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; import * as fs from 'fs'; -import { FormData, File } from 'node-fetch' +import { FormData, File } from 'node-fetch'; describe('API routes', () => { /** @type {import('./test-utils').Fixture} */ diff --git a/packages/astro/test/ssr-api-route.test.js b/packages/astro/test/ssr-api-route.test.js index 5394ead51b..1409657c31 100644 --- a/packages/astro/test/ssr-api-route.test.js +++ b/packages/astro/test/ssr-api-route.test.js @@ -56,14 +56,16 @@ describe('API routes in SSR', () => { }); it('Can be passed binary data from multipart formdata', async () => { - const formData = new FormData(); - const raw = await fs.promises.readFile(new URL('./fixtures/ssr-api-route/src/images/penguin.jpg', import.meta.url)); + const formData = new FormData(); + const raw = await fs.promises.readFile( + new URL('./fixtures/ssr-api-route/src/images/penguin.jpg', import.meta.url) + ); const file = new File([raw], 'penguin.jpg', { type: 'text/jpg' }); formData.set('file', file, 'penguin.jpg'); const res = await fixture.fetch('/binary', { method: 'POST', - body: formData + body: formData, }); expect(res.status).to.equal(200);