1.1.0 • Published 12 months ago
chai-shape v1.1.0
chai-shape
Extend chai with shape assertions.
// use with array
expect([1, 2, 3]).to.have.shape([1, 2])
// use with object
expect({ a: 1, b: 2 }).to.have.shape({ a: 1 })
// use with nested array and object
expect({ a: { b: [1, 2] }}).to.have.shape({ a: { b: [1] }})