xxxxxxxxxx
process.env.NODE_ENV = 'test';
let chai = require('chai');
let chaiHttp = require('chai-http');
let server = require('../app');
let should = chai.should();
chai.use(chaiHttp);
describe('/GET book', () => {
it('it should GET all the books', (done) => {
chai.request(server)
.post('/second/')
.send({title:"hello"})
.end((err, res) => {
res.body.should.have.property('title').eql("hello");
done();
});
});
});