Archived
2
This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
definma-api/src/routes/root.spec.ts
2020-01-14 13:25:13 +01:00

20 lines
478 B
TypeScript

import supertest from 'supertest';
import should from 'should/as-function';
let server = supertest.agent('http://localhost:3000');
describe('Testing /', () => {
it('returns the message object', done => {
server
.get('/')
.expect('Content-type', /json/)
.expect(200)
.end(function(err, res) {
should(res.statusCode).equal(200);
should(res.body).be.eql({message: 'API server up and running!'});
done();
});
});
});