basic jest + typescript support

ref #17
This commit is contained in:
2020-12-05 18:49:09 +01:00
parent 5c259484ee
commit 8ae5cea631
3 changed files with 25 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
import axios from 'axios';
describe('GET /api/openapi.json', () => {
it('is http 200', async () => {
const res = await axios.get('http://localhost:4010/api/openapi.json');
expect(res.status).toEqual(200);
});
});
describe('GET /', () => {
it('is http 404', async () => {
const res = await axios.get('http://localhost:4010/', { validateStatus: undefined });
expect(res.status).toEqual(404);
});
});