sample json validation

ref #17
This commit is contained in:
Philipp Dormann 2020-12-05 18:52:36 +01:00
parent 8ae5cea631
commit 431fd608a6
1 changed files with 8 additions and 0 deletions

View File

@ -12,3 +12,11 @@ describe('GET /', () => {
expect(res.status).toEqual(404);
});
});
describe('GET /api/teams', () => {
it('is http 200 && is json', async () => {
const res = await axios.get('http://localhost:4010/api/teams', { validateStatus: undefined });
console.log(res.headers);
expect(res.status).toEqual(200);
expect(res.headers['content-type']).toContain("application/json")
});
});