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

Commit 6165023

Browse files
angelyordanovjuliemr
authored andcommitted
feat(runner): return a promise from runner.runOnce
In some cases knowing when the runner has finished is a requirement (e.g. an async grunt task).
1 parent 63586db commit 6165023

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/runner.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,12 @@ var runJasmineTests = function() {
304304
* Run Protractor once.
305305
*/
306306
var runOnce = function() {
307-
setUpSelenium().then(function() {
307+
return setUpSelenium().then(function() {
308308
// cleanUp must be registered directly onto runJasmineTests, not onto
309309
// the chained promise, so that cleanUp is still called in case of a
310310
// timeout error. Timeout errors need to clear the control flow, which
311311
// would mess up chaining promises.
312-
runJasmineTests().then(cleanUp);
312+
return runJasmineTests().then(cleanUp);
313313
});
314314
};
315315

0 commit comments

Comments
 (0)