Skip to content

Commit

Permalink
feat: Updated test/api.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Sep 26, 2023
1 parent 85d9c2f commit 13b8136
Showing 1 changed file with 2 additions and 33 deletions.
35 changes: 2 additions & 33 deletions test/api.test.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down

0 comments on commit 13b8136

Please sign in to comment.