Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Run a chai assertion for all elements in the array #2

sebpiq opened this Issue · 3 comments

2 participants


for example

expect([1, 2, 3])'number')

Good idea. I've been thinking of this too, but never found an appropriate syntax that fits with the existing:

[4, 11, 15]
[4, 11, 15].should.contain.some.above(10)
[4, 11, 15].should.not.contain.any.above(20)
[{ a: 'cat' }, { a: 'dog' }]'a', 'cat')
[{ a: 'cat' }, { a: 'dog' }]'a', 'dog')

Any suggestions? I think elements is rather vague.

Some of mine would be:

[4, 11, 15]
[{ a: 'cat' }, { a: 'dog' }]'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.

@RubenVerborgh RubenVerborgh was assigned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.