-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-test.js
26 lines (23 loc) · 883 Bytes
/
index-test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import * as routePaths from '../../src/constants/routes';
import * as infoMessage from '../../src/constants/infos';
import chai from'chai';
import chaiHttp from 'chai-http';
import server from '../../src/app';
const should = chai.should();
chai.use(chaiHttp);
describe('Info', () => {
describe('/GET root', () => {
it('should GET root message', (done) => {
chai.request(server)
.get(routePaths.ROUTE_ROOT)
.end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('object');
res.body.should.have.property('success').eql(true);
res.body.should.have.property('infos');
res.body.infos.should.have.property('message').eql(infoMessage.WELCOME);
done();
});
});
});
});