Closed sebpiq closed 11 years ago
Good idea. I've been thinking of this too, but never found an appropriate syntax that fits with the existing:
[4, 11, 15].should.include.one.below(10)
[4, 11, 15].should.contain.some.above(10)
[4, 11, 15].should.not.contain.any.above(20)
[{ a: 'cat' }, { a: 'dog' }].should.contain.a.thing.with.property('a', 'cat')
[{ a: 'cat' }, { a: 'dog' }].should.contain.an.item.with.property('a', 'dog')
Any suggestions? I think elements
is rather vague.
Some of mine would be:
[4, 11, 15].should.all.be.below(20)
[{ a: 'cat' }, { a: 'dog' }].should.all.have.property('a')
Well ... to me all
fits perfectly your current syntax!
Here you go :hatching_chick: Tell me how you like it! Also, I'm always interested to see projects you're using Chai-Things in.
for example