generated from nhcarrigan/template
feat: initial scaffolding
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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' });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user