Added: Beer API, Docs API and tests for both, fixed build

This commit is contained in:
2024-05-03 01:46:23 +02:00
parent ef4cabff78
commit 44dbf74f1c
10 changed files with 436 additions and 2 deletions

12
api/tests/docs.test.ts Normal file
View File

@@ -0,0 +1,12 @@
import request from 'supertest';
import { app } from '../src/app';
describe('GET /api/v1', () => {
describe('should return json with docs', () => {
test('should respond with a 200 status code', async () => {
const response = await request(app).get('/api/v1').send({});
expect(response.headers['content-type']).toMatch(/json/);
expect(response.statusCode).toBe(200);
});
});
});