Closed MIvanchev closed 9 years ago
Hi @MIvanchev ! Try to use only chai-subset
[{ a: 'cat' }, { a: 'dog' }].should.containSubset([{a: 'cat'}])
In general chai-subset language chain works, for example
{petHouse: [{ a: 'cat' }, { a: 'dog' }]}.should.have.property('petHouse').to.containSubset([{a: 'cat'}])
So it seems that this problem with chai-things that provides include.something
and not with chai-subset.
Looking forward to hear from you if it helped or not
Hi @eagleeye!
I just tested your suggestion and it seems to work fine :) Thank you for your help. Perhaps extra documenting this case would make it easier for newcomers!
Regards
@MIvanchev please make PR with improvements that you think will help. It's hard to see from developers perspective how this will work for newcomers. Check the bottom of Readme - few days ago i released new version of chai-subset that includes that part of Readme. In case if this is not enough - please make a PR)
Currently the following assertion fails:
Also, a language chain 'containsSubset' would be great.