Remove deprecated class jasmine.Reporters.
Fully deprecate old-style Matchers; will be removed in next major version.
This commit is contained in:
@@ -15,25 +15,11 @@ jasmine.Matchers = function(env, actual, spec, opt_isNot) {
|
||||
// todo: @deprecated as of Jasmine 0.11, remove soon [xw]
|
||||
jasmine.Matchers.pp = function(str) {
|
||||
throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!");
|
||||
this.report();
|
||||
};
|
||||
|
||||
/** @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. */
|
||||
// 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) {
|
||||
// todo: report a deprecation warning [xw]
|
||||
|
||||
if (this.isNot) {
|
||||
throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
|
||||
}
|
||||
|
||||
this.reportWasCalled_ = true;
|
||||
var expectationResult = new jasmine.ExpectationResult({
|
||||
passed: result,
|
||||
message: failing_message,
|
||||
details: details
|
||||
});
|
||||
this.spec.addMatcherResult(expectationResult);
|
||||
return result;
|
||||
throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs");
|
||||
};
|
||||
|
||||
jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) {
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/** JasmineReporters.reporter
|
||||
* Base object that will get called whenever a Spec, Suite, or Runner is done. It is up to
|
||||
* descendants of this object to do something with the results (see json_reporter.js)
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
jasmine.Reporters = {};
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @param callbacks
|
||||
*/
|
||||
jasmine.Reporters.reporter = function(callbacks) {
|
||||
/**
|
||||
* @deprecated
|
||||
* @param callbacks
|
||||
*/
|
||||
var that = {
|
||||
callbacks: callbacks || {},
|
||||
|
||||
doCallback: function(callback, results) {
|
||||
if (callback) {
|
||||
callback(results);
|
||||
}
|
||||
},
|
||||
|
||||
reportRunnerResults: function(runner) {
|
||||
that.doCallback(that.callbacks.runnerCallback, runner);
|
||||
},
|
||||
reportSuiteResults: function(suite) {
|
||||
that.doCallback(that.callbacks.suiteCallback, suite);
|
||||
},
|
||||
reportSpecResults: function(spec) {
|
||||
that.doCallback(that.callbacks.specCallback, spec);
|
||||
},
|
||||
log: function (str) {
|
||||
var console = jasmine.getGlobal().console;
|
||||
if (console && console.log) console.log(str);
|
||||
}
|
||||
};
|
||||
|
||||
return that;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user