-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix(launcher): running getMultiCapabilities should reject on errors #3876
Conversation
}).then(() => resolve()); | ||
q(config.getMultiCapabilities()) | ||
.then((multiCapabilities) => { | ||
console.log('here'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor stuff
@@ -112,7 +112,7 @@ let initFn = function(configFile: string, additionalConfig: Config) { | |||
.then(() => { | |||
|
|||
return q | |||
.Promise<any>((resolve: Function) => { | |||
.Promise<any>((resolve: Function, reject: Function) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be new q.Promise(...
. Not your fault but please fix anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not possible. Setting this to void returns a transpile error. lib/launcher.ts(114,16): error TS2350: Only a void function can be called with the 'new' keyword.
runProtractor = spawn('node', | ||
['bin/protractor', 'spec/errorTest/getMultiCapabilitiesConf.js']); | ||
output = runProtractor.stderr.toString(); | ||
console.log(output); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftover from debugging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Done.
framework: 'debugprint', | ||
getMultiCapabilities: function() { | ||
return new Promise((resolve) => { | ||
this.foo.bar = 1; // will fail because this.foo is undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather you just threw something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Throwing error.
8adadba
to
8b78800
Compare
8b78800
to
ab20e57
Compare
closes #3875