Skip to content

Instantly share code, notes, and snippets.

View richardiux's full-sized avatar

Richard Millan richardiux

View GitHub Profile
jasmine.Matchers.prototype.toBeSameJqueryObjectAs = function(expected) {
var error_message = null;
if(!expected || !this.actual || this.actual.length != expected.length) {
error_message = "Expected to have same number of matching elements";
} else {
for(var i = 0; i < expected.length; i++) {
if (this.actual.get(i) != expected.get(i)) {
error_message = "Expected the elements to be the same but were not";
break;
}