Automattic / Automattic/expect.js
Add a way to check a value is eql to someone
Open
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 207
- PR merge metrics
- No merged PRs in 30d
Description
`expect(x).to.be.in([x1, x2, x3])` will be true if 'expect(x).to.eql(x1)` or x2 or x3.
The idea is to use with any object. Example:
``` js
expect(['encode', 'utf8']).be.in([ ['encode','utf8'], ['overwrite', false] ])
```
I couldn't use `expect([x1, x2, x3]).to.include(x)` because it uses _indexOf_ doesn't work for objects (because implies ===).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.