call back when done

This commit is contained in:
Steve Conover
2011-02-28 23:58:06 -08:00
parent 88ee377662
commit a1ba43c864
2 changed files with 19 additions and 3 deletions

View File

@@ -47,7 +47,11 @@ describe("TrivialConsoleReporter", function() {
};
})();
this.reporter = new jasmine.TrivialConsoleReporter(this.out.print);
this.done = false
var self = this
this.reporter = new jasmine.TrivialConsoleReporter(this.out.print, function(runner){
self.done = true
});
});
@@ -408,6 +412,16 @@ describe("TrivialConsoleReporter", function() {
});
});
describe("done callback", function(){
it("calls back when done", function() {
expect(this.done).toBeFalsy();
this.reporter.reportRunnerResults({
results:function(){return {items_: [null, null, null], totalCount: 7, failedCount: 0};}
});
expect(this.done).toBeTruthy();
});
});
});
});