Files
jasmine/src/core/JsApiReporter.js
Davis W. Frank 3fc79bac9e * Removed old Queue & Runner in favor of Suite using the new QueueRunner
* New reporter interface across all reporters
* xdescribe & xit now store disabled specs
* Rewrite of HtmlReporter to support new interface and be more performant
2013-02-19 11:45:05 -08:00

60 lines
985 B
JavaScript

jasmine.JsApiReporter = function(jasmine) {
this.jasmine = jasmine || {};
this.started = false;
this.finished = false;
this.suites_ = [];
this.results_ = {};
var status = 'loaded';
this.jasmineStarted = function() {
this.started = true;
status = 'started';
};
this.jasmineDone = function() {
this.finished = true;
status = 'done';
};
this.status = function() {
return status;
};
var suites = {};
this.suiteStarted = function(result) {
storeSuite(result);
};
this.suiteDone = function(result) {
storeSuite(result);
};
function storeSuite(result) {
suites[result.id] = result;
}
this.suites = function() {
return suites;
};
var specs = {};
this.specStarted = function(result) {
storeSpec(result);
};
this.specDone = function(result) {
storeSpec(result);
};
function storeSpec(result) {
specs[result.id] = result;
}
this.specs = function() {
return specs;
};
};