Better deprecation messages.

This commit is contained in:
Christian Williams 2010-03-05 22:40:47 -05:00
parent 23d5c7180b
commit e9a2b0dcdb
1 changed files with 3 additions and 1 deletions

View File

@ -12,11 +12,13 @@ jasmine.Matchers = function(env, actual, spec, opt_isNot) {
this.reportWasCalled_ = false; this.reportWasCalled_ = false;
}; };
// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
jasmine.Matchers.pp = function(str) { 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!");
this.report();
}; };
/** @deprecated */ /** @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. */
jasmine.Matchers.prototype.report = function(result, failing_message, details) { jasmine.Matchers.prototype.report = function(result, failing_message, details) {
// todo: report a deprecation warning [xw] // todo: report a deprecation warning [xw]