it('GET /customers/ with wrong id', (done) => {
request
.get(`/customers/${wrongId}`)
.end((err, res) => {
expect(res.body).to.equals({});
expect(res).to.have.status(404);
done();
});
});
1) Customers CRUD GET /customers/ with wrong id:
Uncaught AssertionError: expected {} to equal {}
+ expected - actual
You want to use deep
if you're trying to compare objects:
expect(res.body).to.deep.equal({});
Or use the eql
method:
expect(res.body).to.eql({});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With