Wrap HTML elements in $ so matchers still work
Esse commit está contido em:
externo
+3
@@ -138,6 +138,9 @@ jasmine.JQuery.matchersClass = {};
|
||||
var builtInMatcher = jasmine.Matchers.prototype[methodName];
|
||||
|
||||
jasmine.JQuery.matchersClass[methodName] = function() {
|
||||
if (this.actual instanceof HTMLElement) {
|
||||
this.actual = jQuery(this.actual);
|
||||
}
|
||||
if (this.actual instanceof jQuery) {
|
||||
var result = jQueryMatchers[methodName].apply(this, arguments);
|
||||
this.actual = jasmine.JQuery.elementToString(this.actual);
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário