1.0.0 • Published 2 years ago
chai-shape v1.0.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] }})
1.0.0
2 years ago