Equivalent to rspec =~ for arrays in Chai

Viewed 1166

Does Chai, matchers have an equilivent to rspecs =~ (which means has all elements but order doesn't matter.

Passing example

[1, 2, 3].should =~ [2, 1, 3]

Failing

[1, 2, 3].should =~ [1, 2]
3 Answers
Related