From b45b4e37af14d94726b0c5d2691289886c0527cf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Tue, 12 Sep 2023 10:56:10 +0200 Subject: Reformat with prettier --- test/index.test.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'test') diff --git a/test/index.test.ts b/test/index.test.ts index 8a32e47..234bd1e 100644 --- a/test/index.test.ts +++ b/test/index.test.ts @@ -1,28 +1,28 @@ -import { type Server } from "bun" -import { expect, test, beforeAll, afterAll } from "bun:test" +import { type Server } from "bun"; +import { expect, test, beforeAll, afterAll } from "bun:test"; -import app from "../src/index" +import app from "../src/index"; const port = 33000; const base = `http://localhost:${port}/`; -let server: Server +let server: Server; beforeAll(async function () { - server = Bun.serve(Object.assign({}, app, { port })) -}) + server = Bun.serve(Object.assign({}, app, { port })); +}); afterAll(function () { - server.stop() -}) + server.stop(); +}); test("/status returns 200 OK", async function () { - const res = await fetch(new URL("/status", base)) - expect(res.status).toBe(200) - expect(await res.text()).toBe("OK") -}) + const res = await fetch(new URL("/status", base)); + expect(res.status).toBe(200); + expect(await res.text()).toBe("OK"); +}); test("/ returns 200 and says Hello world", async function () { - const res = await fetch(base) - expect(res.status).toBe(200) - expect(await res.text()).toBe("Hello world") -}) + const res = await fetch(base); + expect(res.status).toBe(200); + expect(await res.text()).toBe("Hello world"); +}); -- cgit 1.4.1