Remove Matchers report code cruft.
- Code that used reportWasCalled was removed previously.
This commit is contained in:
@@ -9,7 +9,6 @@ jasmine.Matchers = function(env, actual, spec, opt_isNot) {
|
|||||||
this.actual = actual;
|
this.actual = actual;
|
||||||
this.spec = spec;
|
this.spec = spec;
|
||||||
this.isNot = opt_isNot || false;
|
this.isNot = opt_isNot || false;
|
||||||
this.reportWasCalled_ = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
|
// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
|
||||||
@@ -17,14 +16,8 @@ jasmine.Matchers.pp = function(str) {
|
|||||||
throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
|
throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
|
||||||
};
|
};
|
||||||
|
|
||||||
// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw]
|
|
||||||
jasmine.Matchers.prototype.report = function(result, failing_message, details) {
|
|
||||||
throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
|
jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
|
||||||
for (var methodName in prototype) {
|
for (var methodName in prototype) {
|
||||||
if (methodName == 'report') continue;
|
|
||||||
var orig = prototype[methodName];
|
var orig = prototype[methodName];
|
||||||
matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
|
matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig);
|
||||||
}
|
}
|
||||||
@@ -39,8 +32,6 @@ jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) {
|
|||||||
result = !result;
|
result = !result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.reportWasCalled_) return result;
|
|
||||||
|
|
||||||
var message;
|
var message;
|
||||||
if (!result) {
|
if (!result) {
|
||||||
if (this.message) {
|
if (this.message) {
|
||||||
|
|||||||
Reference in New Issue
Block a user