about summary refs log tree commit diff stats
path: root/test
diff options
context:
space:
mode:
authorAlan Pearce2023-09-12 16:54:29 +0200
committerAlan Pearce2023-09-12 16:54:29 +0200
commit2f6152539c540697290ec73a7c1b50b9f2db88c6 (patch)
treec500b3dcb57c4a9c35a7c9e001e3e92b127253d2 /test
parent78439b16cc66532225e75c9aa40cf7c49cddc22d (diff)
downloadwebsite-2f6152539c540697290ec73a7c1b50b9f2db88c6.tar.lz
website-2f6152539c540697290ec73a7c1b50b9f2db88c6.tar.zst
website-2f6152539c540697290ec73a7c1b50b9f2db88c6.zip
Use own logic for static file serving
Diffstat (limited to 'test')
-rw-r--r--test/index.test.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/test/index.test.ts b/test/index.test.ts
index 234bd1e..c1f5f64 100644
--- a/test/index.test.ts
+++ b/test/index.test.ts
@@ -15,14 +15,12 @@ afterAll(function () {
   server.stop();
 });
 
-test("/status returns 200 OK", async function () {
-  const res = await fetch(new URL("/status", base));
+test("/ returns 200", async function () {
+  const res = await fetch(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");
+test("/asdf returns 404", async function () {
+  const res = await fetch(`${base}asdf`);
+  expect(res.status).toBe(404);
 });