Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
feat(runner): return a promise from runner.runOnce
Browse files Browse the repository at this point in the history
In some cases knowing when the runner has finished is a requirement (e.g. an async grunt task).
  • Loading branch information
angelyordanov authored and juliemr committed Dec 18, 2013
1 parent 63586db commit 6165023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ var runJasmineTests = function() {
* Run Protractor once.
*/
var runOnce = function() {
setUpSelenium().then(function() {
return setUpSelenium().then(function() {
// cleanUp must be registered directly onto runJasmineTests, not onto
// the chained promise, so that cleanUp is still called in case of a
// timeout error. Timeout errors need to clear the control flow, which
// would mess up chaining promises.
runJasmineTests().then(cleanUp);
return runJasmineTests().then(cleanUp);
});
};

Expand Down

0 comments on commit 6165023

Please sign in to comment.