Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an assertion that makes sure all items in an array satisfy a condition #331

Closed
oveddan opened this issue Dec 27, 2014 · 2 comments
Closed

Comments

@oveddan
Copy link

oveddan commented Dec 27, 2014

For example:

   var objects = [{a: '5', b: 'c'}, new Object(), {}] 
   expect(objects).all.to.be.an('object');
@keithamus
Copy link
Member

Thanks for the issue @oveddan, and this is a pretty great suggestion! There's already a plugin called chai-things which has exactly the syntax you're requesting.

I'm going to close this issue as the plugin exists and while we could merge chai-things into core, it's additional maintenance burden, potential source of bugs, and @RubenVerborgh is doing a pretty swell job of keeping chai-things well maintained.

@HoldYourWaffle
Copy link

Is there a proper solution for this yet?
It looks like chai-things isn't maintained anymore (chaijs/chai-things#44, chaijs/chai-things#58), although it was pulled into the chaijs org.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants