chai-subset icon indicating copy to clipboard operation
chai-subset copied to clipboard

Subset with exact array order

Open bladeSk opened this issue 8 years ago • 1 comments

As the title says. Have you considered adding this functionality? I found myself needing to use it a lot when testing MongoDB outputs and any other structured data, really.

[1, 2, 3].should.containSubsetInOrder([1, 2, 3]];
[1, 2, 3].should.not.containSubsetInOrder([3, 2, 1]];

Here's a fork of your library that implements this: chai-subset-in-order. But why use 2 libraries, when the original one could handle this easily? I could do a PR. Would you consider merging this in?

Related issue https://github.com/debitoor/chai-subset/issues/46

bladeSk avatar Aug 01 '17 11:08 bladeSk

@bladeSk yeap, I'll merge it. Don't forget to write some tests

eagleeye avatar Aug 02 '17 11:08 eagleeye