Custom matchers may now work like regular matchers -- just return a boolean, don't call this.report(). The old style still works but is deprecated.
This commit is contained in:
@@ -98,9 +98,7 @@ jasmine.Spec.prototype.addMatchers = function(matchersPrototype) {
|
||||
parent.apply(this, arguments);
|
||||
};
|
||||
jasmine.util.inherit(newMatchersClass, parent);
|
||||
for (var method in matchersPrototype) {
|
||||
newMatchersClass.prototype[method] = matchersPrototype[method];
|
||||
}
|
||||
jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass);
|
||||
this.matchersClass = newMatchersClass;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user