diff --git a/test/api.test.ts b/test/api.test.ts index 9849fad..b1fd0c3 100644 --- a/test/api.test.ts +++ b/test/api.test.ts @@ -1,38 +1,7 @@ import fastify from 'fastify'; -import { expect, test } from "bun:test"; -import server from '../server'; +import assert from 'assert'; -// Test for GET /api -test('GET /api', async () => { - const response = await server.inject({ - method: 'GET', - url: '/api' - }); - expect(response.statusCode).toBe(200); - expect(response.headers['content-type']).toBe('application/json; charset=utf-8'); -}); - -// Test for GET /api/hello -test('GET /api/hello', async () => { - const response = await server.inject({ - method: 'GET', - url: '/api/hello' - }); - expect(response.statusCode).toBe(200); - expect(response.headers['content-type']).toBe('application/json; charset=utf-8'); -}); - -// Test for GET /api/ping -test('GET /api/ping', async () => { - const response = await server.inject({ - method: 'GET', - url: '/api/ping' - }); - expect(response.statusCode).toBe(200); - expect(response.headers['content-type']).toBe('application/json; charset=utf-8'); -}); - -import server from '../server'; +import { server } from '../server'; // Test for GET /api app.inject({