Open emilioplatzer opened 9 years ago
expect(x).to.be.in([x1, x2, x3]) will be true if 'expect(x).to.eql(x1)` or x2 or x3.
expect(x).to.be.in([x1, x2, x3])
The idea is to use with any object. Example:
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 ===).
expect([x1, x2, x3]).to.include(x)
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:
I couldn't use
expect([x1, x2, x3]).to.include(x)
because it uses indexOf doesn't work for objects (because implies ===).