You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.all
Sets the all flag (opposite of the any flag) later used by the keys assertion.
expect(foo).to.have.all.keys('bar', 'baz');
It is not clear whether 'all' means all-and-only. I.e., it is not clear whether: (a) foo is supposed to have keys 'bar' and 'baz' (but could also have key 'bof'); or (b) foo is suppose to have only keys 'bar' and 'baz' (as own properties).
The text was updated successfully, but these errors were encountered:
@dbooth-boston Thanks for helping with Chai. The behavior of all varies depending on if have or contains is present, as described here. Unlike all, most other flags are associated with multiple assertions, so details of a flag's behavior are typically located in the comments for the relevant assertion(s).
Any suggested improvements should be made in the code comments in the Chai repo, as the website documentation is automatically generated from that.
In http://chaijs.com/api/bdd/
It is not clear whether 'all' means all-and-only. I.e., it is not clear whether: (a) foo is supposed to have keys 'bar' and 'baz' (but could also have key 'bof'); or (b) foo is suppose to have only keys 'bar' and 'baz' (as own properties).
The text was updated successfully, but these errors were encountered: