This repository was archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(runner/frameworks): Change interface contract of the protractor …
…runner instance so that it returns a promise instead of calling a callback function
- Loading branch information
Showing
7 changed files
with
110 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
var util = require('util'); | ||
var util = require('util'), | ||
q = require('q'); | ||
|
||
/** | ||
* A debug framework which does not actually run any tests, just spits | ||
* out the list that would be run. | ||
* | ||
* @param {Runner} runner The current Protractor Runner. | ||
* @param {Array} specs Array of Directory Path Strings. | ||
* @param done A callback for when tests are finished. | ||
* @return {q.Promise} Promise resolved with the test results | ||
*/ | ||
exports.run = function(runner, specs, done) { | ||
console.log('Resolved spec files: ' + util.inspect(specs)); | ||
done({ | ||
failedCount: 0 | ||
exports.run = function(runner, specs) { | ||
return q.promise(function (resolve) { | ||
console.log('Resolved spec files: ' + util.inspect(specs)); | ||
resolve({ | ||
failedCount: 0 | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters