So I'm trying to test for the values of Boolean property in an array of object. Currently I'm using this code which doesn't seem to work.
describe('/GET/deleted', () => {
it('should get all objects that are deleted', (done) => {
chai.request(server)
.get('/api/object/deleted')
.set('Cookie', cookie)
.end((err, res) => {
res.should.have.status(200);
res.body.should.be.a('array');
expect(res.body).to.have.deep.property('[0].deleted', true);
done();
});
});
})
How would you test for the values of a boolean property in an array of objects. Any help would be appreciated. Thanks!