This commit is contained in:
18
test/routes/toplevel.test.js
Normal file
18
test/routes/toplevel.test.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const request = require('supertest');
|
||||
const { expect } = require('chai');
|
||||
const app = require('../../src/app');
|
||||
|
||||
describe('GET /', () => {
|
||||
beforeEach(async () => {
|
||||
const res = await request(app).get('/');
|
||||
this.res = res;
|
||||
});
|
||||
|
||||
it('should return a 200 status', async () => {
|
||||
expect(this.res.status).to.equal(200);
|
||||
});
|
||||
|
||||
it('should return an HTML response', async () => {
|
||||
expect(this.res.headers['content-type']).match(/text\/html/);
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user