it('Should be return current_price = null when trying to bid a auction with wrong parameter', (done) => { models.Auction.findAll().then(auctions => { const auctionsLength = auctions.length if (auctionsLength != 0) { chai.request(serverHost).post('/bids/') .set('userid', process.env.USER_ID_IN_LOCAL) .set('token', process.env.BUKALAPAK_TOKEN) .send({ auctionId: 2889, nextBid: 140000 }).end((err, res) => { if (err) { done(err) } else { res.should.have.status(200); res.should.be.json; should.equal(res.body.current_price, null); done() } }); } else { console.log('tidak ada auctions di DB'); } }) })