Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 229 Bytes

length.md

File metadata and controls

13 lines (7 loc) · 229 Bytes

length

  • to[.not].have.length

This assertion checks that the length property is a certain value.

For example:

expect(x).to.have.length(4);

The above is equivalent to:

expect(x).to.have.property('length', 4);