lundi 11 juillet 2016

Should.js: check if two arrays contain same strings

I have two arrays:

var a = ['a', 'as', 'sa'];
var b = ['sa', 'a', 'as'];

Is there anything special in shouldJS to test if these two arrays have same items? Anything Like

should(a).be.xyz(b)

that can test them? Here, xyz is what I am looking for.

Aucun commentaire:

Enregistrer un commentaire