about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2023-09-12 10:56:10 +0200
committerAlan Pearce2023-09-12 10:56:10 +0200
commitb45b4e37af14d94726b0c5d2691289886c0527cf (patch)
tree80f1a5ee7b64c08bf7b755a4cd062c1d86435d94
parent7fc8048d3104cf9e129920326b30aaefaaaeb89b (diff)
downloadhomestead-b45b4e37af14d94726b0c5d2691289886c0527cf.tar.lz
homestead-b45b4e37af14d94726b0c5d2691289886c0527cf.tar.zst
homestead-b45b4e37af14d94726b0c5d2691289886c0527cf.zip
Reformat with prettier
-rw-r--r--src/index.ts10
-rw-r--r--test/index.test.ts32
2 files changed, 21 insertions, 21 deletions
diff --git a/src/index.ts b/src/index.ts
index 59913b3..4887dd6 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,10 +1,10 @@
-import { withHtmlLiveReload } from "bun-html-live-reload"
-import serveStatic from "serve-static-bun"
+import { withHtmlLiveReload } from "bun-html-live-reload";
+import serveStatic from "serve-static-bun";
 
-const dir = Bun.argv.length > 2 ? Bun.argv[Bun.argv.length - 1] : "./"
+const dir = Bun.argv.length > 2 ? Bun.argv[Bun.argv.length - 1] : "./";
 
 export default withHtmlLiveReload({
   fetch: serveStatic(dir, {
-    dotfiles: "allow"
+    dotfiles: "allow",
   }),
-})
+});
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");
+});