|
- import { describe, it, expect, beforeAll } from 'vitest';
- import {FastifyInstance} from 'fastify';
- import { createServer } from '../src/server';
- import { addRoutes } from '../src/routes';
-
- describe('Example', () => {
- let server: FastifyInstance
- beforeAll(() => {
- server = createServer()
- addRoutes(server)
- })
-
- it('should have the expected content', async () => {
- const response = await server
- .inject()
- .get('/')
- .headers({
- 'Accept': 'application/json',
- });
- expect(response.statusCode).toBe(200);
- });
- });
|