I'm writing JavaScript unit tests (with the QUnit library). I need to verify that my array contains expected (and only) elements.
var array = getArrayFunction(a, b);
equal(["one", "two", "three"], array, "Test is failing even if 'array' contains needed elements");
What would be the easiest way to do this?