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:
@@ -26,10 +26,7 @@ jasmine.Env = function() {
|
||||
};
|
||||
jasmine.util.inherit(this.matchersClass, jasmine.Matchers);
|
||||
|
||||
for (var methodName in jasmine.Matchers.prototype) {
|
||||
var orig = jasmine.Matchers.prototype[methodName];
|
||||
this.matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
|
||||
}
|
||||
jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user