1 /** JasmineReporters.reporter 2 * Base object that will get called whenever a Spec, Suite, or Runner is done. It is up to 3 * descendants of this object to do something with the results (see json_reporter.js) 4 * 5 * @deprecated 6 */ 7 jasmine.Reporters = {}; 8 9 /** 10 * @deprecated 11 * @param callbacks 12 */ 13 jasmine.Reporters.reporter = function(callbacks) { 14 /** 15 * @deprecated 16 * @param callbacks 17 */ 18 var that = { 19 callbacks: callbacks || {}, 20 21 doCallback: function(callback, results) { 22 if (callback) { 23 callback(results); 24 } 25 }, 26 27 reportRunnerResults: function(runner) { 28 that.doCallback(that.callbacks.runnerCallback, runner); 29 }, 30 reportSuiteResults: function(suite) { 31 that.doCallback(that.callbacks.suiteCallback, suite); 32 }, 33 reportSpecResults: function(spec) { 34 that.doCallback(that.callbacks.specCallback, spec); 35 }, 36 log: function (str) { 37 if (this.console && this.console.log) this.console.log(str); 38 } 39 }; 40 41 return that; 42 }; 43 44