dwf: moved runner finished & callback test to suites
This commit is contained in:
parent
9928674b37
commit
95b52b9f82
|
@ -284,7 +284,6 @@ var runTests = function () {
|
|||
runSuite('JsonReporterTest.js');
|
||||
runSuite('SpyTest.js');
|
||||
|
||||
testRunnerFinishCallback();
|
||||
testFormatsExceptionMessages();
|
||||
testHandlesExceptions();
|
||||
testResultsAliasing();
|
||||
|
|
|
@ -95,4 +95,23 @@ describe('RunnerTest', function() {
|
|||
expect(results.failedCount).toEqual(1);
|
||||
});
|
||||
|
||||
it('should set the finished flag when #finished is called', function(){
|
||||
env.currentRunner.finish();
|
||||
|
||||
expect(env.currentRunner.finished).toEqual(true);
|
||||
});
|
||||
|
||||
it('should call the finish callback when the runner is finished', function() {
|
||||
var foo = 0;
|
||||
|
||||
env.currentRunner.finishCallback = function() {
|
||||
foo++;
|
||||
};
|
||||
|
||||
env.currentRunner.finish();
|
||||
|
||||
expect(env.currentRunner.finished).toEqual(true);
|
||||
expect(foo).toEqual(1);
|
||||
});
|
||||
|
||||
});
|
Loading…
Reference in New Issue