From 5e86d7ab9c5200d794c3adb2b422d20a2aefd2ce Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 13 Aug 2022 02:00:50 +0200 Subject: restructure to single project --- tests/routes/ping.test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/routes/ping.test.js (limited to 'tests/routes/ping.test.js') diff --git a/tests/routes/ping.test.js b/tests/routes/ping.test.js new file mode 100644 index 00000000..6fa4b160 --- /dev/null +++ b/tests/routes/ping.test.js @@ -0,0 +1,12 @@ +const supertest = require("supertest"); +const request = supertest("http://localhost:3001"); + +describe("/ping", () => { + describe("GET", () => { + test("should return 200 and pong", async () => { + let response = await request.get("/api/ping"); + expect(response.text).toBe("pong"); + expect(response.statusCode).toBe(200); + }); + }); +}); -- cgit 1.4.1