Open nathanmacinnes opened 10 years ago
This is something I'll find very useful. I've tried to make the tests illustrate the benefit, but in a bit more detail:
expect(fooBar).to.have.property("foo").which.is.an("object") .and.has.property("bar").which.is.a("function");
and this is the equivalent without .which:
.which
expect(fooBar).to.have.property("foo"); expect(fooBar.foo).to.be.an("object") .and.to.have.property("bar"); expect(fooBar.foo.bar).to.be.a("function");
This is something I'll find very useful. I've tried to make the tests illustrate the benefit, but in a bit more detail:
and this is the equivalent without
.which
: