generated from nhcarrigan/template
21 lines
432 B
TypeScript
21 lines
432 B
TypeScript
import Fastify, { FastifyInstance } from 'fastify';
|
|
import { app } from './app';
|
|
|
|
describe('GET /', () => {
|
|
let server: FastifyInstance;
|
|
|
|
beforeEach(() => {
|
|
server = Fastify();
|
|
server.register(app);
|
|
});
|
|
|
|
it('should respond with a message', async () => {
|
|
const response = await server.inject({
|
|
method: 'GET',
|
|
url: '/',
|
|
});
|
|
|
|
expect(response.json()).toEqual({ message: 'Hello API' });
|
|
});
|
|
});
|