Should.js: check if two arrays contain same strings
A naive, but possibly sufficient solution would be to sort the arrays before comparing them:
should(a.sort()).be.eql(b.sort())
Note that sort()
works in-place, mutating the original arrays.
A naive, but possibly sufficient solution would be to sort the arrays before comparing them:
should(a.sort()).be.eql(b.sort())
Note that sort()
works in-place, mutating the original arrays.