dwf/rva: actionColllection now has an optional finishCallback

This commit is contained in:
pivotal
2008-12-04 09:37:36 -08:00
parent f5486bde35
commit 735ebd6c66
3 changed files with 95 additions and 59 deletions

29
test/bootstrap.js vendored
View File

@@ -541,6 +541,34 @@ var testRunner = function() {
}, 1000);
}
var testRunnerFinishCallback = function () {
var runner = Runner();
var foo = 0;
runner.finish();
reporter.test((runner.finishCallback === undefined),
"Runner finish callback was defined");
reporter.test((runner.finished === true),
"Runner finished flag was not set.");
runner.finishCallback = function () {
foo++;
}
runner.finish();
reporter.test((runner.finished === true),
"Runner finished flag was not set.");
reporter.test((runner.finishCallback !== undefined),
"Runner finish callback was not defined");
reporter.test((foo === 1),
"Runner finish callback was not called");
}
var testNestedResults = function () {
// Leaf case
@@ -636,6 +664,7 @@ var runTests = function () {
testBeforeAndAfterCallbacks();
testSpecScope();
testRunner();
testRunnerFinishCallback();
testNestedResults();
testReporting();