summary refs log tree commit diff
path: root/tests/routes/ping.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tests/routes/ping.test.js')
-rw-r--r--tests/routes/ping.test.js12
1 files changed, 12 insertions, 0 deletions
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);
+		});
+	});
+});