Closed piotr-s-brainhub closed 7 years ago
It might be useful for some users, so Pull requests are welcome!
Definitely would love to see this.
Maybe thats for a different module to solve? Single purpose modules are good.
On 12 Oct 2016, at 23.03, Dan Kez notifications@github.com wrote:
Definitely would love to see this.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
I have created such a module https://github.com/oprogramador/chai-subset-in-order and registered it in npm as chai-subset-in-order.
@oprogramador that's the spirit! ;)
In containSubset the order doesn't matter.
expect([{a: 3, b:90}, {a: 90}]).to.containSubset([{a: 90}, {a: 3}])
- it passesIt would be nice to have a method containSubsetInOrder
expect([{a: 3, b:90}, {a: 90}]).to.containSubsetInOrder([{a: 90}, {a: 3}])
- it should failexpect([{a: 3, b:90}, {a: 90}]).to.containSubsetInOrder([{a: 3}, {a: 90}])
- it should pass