dwf: moved runner finished & callback test to suites
This commit is contained in:
1
spec/bootstrap.js
vendored
1
spec/bootstrap.js
vendored
@@ -284,7 +284,6 @@ var runTests = function () {
|
|||||||
runSuite('JsonReporterTest.js');
|
runSuite('JsonReporterTest.js');
|
||||||
runSuite('SpyTest.js');
|
runSuite('SpyTest.js');
|
||||||
|
|
||||||
testRunnerFinishCallback();
|
|
||||||
testFormatsExceptionMessages();
|
testFormatsExceptionMessages();
|
||||||
testHandlesExceptions();
|
testHandlesExceptions();
|
||||||
testResultsAliasing();
|
testResultsAliasing();
|
||||||
|
|||||||
@@ -95,4 +95,23 @@ describe('RunnerTest', function() {
|
|||||||
expect(results.failedCount).toEqual(1);
|
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);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
Reference in New Issue
Block a user