Refactor suite timing out of Env and into each Reporter

[finishes #45659879]
This commit is contained in:
Davis W. Frank and Sheel Choksi
2013-07-03 09:29:52 -07:00
parent 09fe7b0540
commit 179e54b9fb
16 changed files with 213 additions and 52 deletions

View File

@@ -1,21 +1,28 @@
getJasmineRequireObj().JsApiReporter = function() {
function JsApiReporter(jasmine) { // TODO: this doesn't appear to be used
this.jasmine = jasmine || {};
var noopTimer = {
start: function(){},
elapsed: function(){ return 0; }
};
function JsApiReporter(options) {
var timer = options.timer || noopTimer,
status = "loaded";
this.started = false;
this.finished = false;
var status = 'loaded';
this.jasmineStarted = function() {
this.started = true;
status = 'started';
timer.start();
};
var executionTime;
this.jasmineDone = function(options) {
this.jasmineDone = function() {
this.finished = true;
executionTime = options.executionTime;
executionTime = timer.elapsed();
status = 'done';
};