Don’t require a specific jQuery instance for jasmine jQuery matchers

Signed-off-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Esse commit está contido em:
Nathan Sobo
2014-11-06 15:27:45 -07:00
commit de Max Brunsfeld
commit 7e06e10fcf
+1 -1
Ver Arquivo
@@ -141,7 +141,7 @@ jasmine.JQuery.matchersClass = {};
if (this.actual instanceof HTMLElement) { if (this.actual instanceof HTMLElement) {
this.actual = jQuery(this.actual); this.actual = jQuery(this.actual);
} }
if (this.actual instanceof jQuery) { if (this.actual && this.actual.jquery) {
var result = jQueryMatchers[methodName].apply(this, arguments); var result = jQueryMatchers[methodName].apply(this, arguments);
this.actual = jasmine.JQuery.elementToString(this.actual); this.actual = jasmine.JQuery.elementToString(this.actual);
return result; return result;