egoport/tests/routes/index.test.ts

14 lines
362 B
TypeScript
Raw Permalink Normal View History

2023-11-20 19:32:02 +01:00
import server from '../../src/server';
import { describe, test, expect } from 'vitest';
describe('GET /', () => {
test('Should return hello world', async () => {
const response = await server.inject({
method: 'GET',
path: '/',
});
expect(response.statusCode).eq(200);
expect(response.json()).deep.eq({ hello: 'world' });
});
});