diff options
author | Alan Pearce | 2023-09-12 16:54:29 +0200 |
---|---|---|
committer | Alan Pearce | 2023-09-12 16:54:29 +0200 |
commit | 2f6152539c540697290ec73a7c1b50b9f2db88c6 (patch) | |
tree | c500b3dcb57c4a9c35a7c9e001e3e92b127253d2 /test | |
parent | 78439b16cc66532225e75c9aa40cf7c49cddc22d (diff) | |
download | homestead-2f6152539c540697290ec73a7c1b50b9f2db88c6.tar.lz homestead-2f6152539c540697290ec73a7c1b50b9f2db88c6.tar.zst homestead-2f6152539c540697290ec73a7c1b50b9f2db88c6.zip |
Use own logic for static file serving
Diffstat (limited to 'test')
-rw-r--r-- | test/index.test.ts | 12 |
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); }); |