Skip to content

Commit

Permalink
added support to new promises
Browse files Browse the repository at this point in the history
  • Loading branch information
tocalvo authored and lukas-reineke committed Jul 27, 2018
1 parent 078023c commit 9d8f52c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xray-reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ const XrayReporter = (options, onPrepareDefer, onCompleteDefer, browser) => {

browser.getProcessedConfig().then((config) => {
result.info.summary = config.capabilities.name || 'no name';
onPrepareDefer.fulfill();
if(onPrepareDefer.resolve){
onPrepareDefer.resolve();
} else {
onPrepareDefer.fulfill();
}
});

let specPromises = [];
Expand Down Expand Up @@ -188,7 +192,11 @@ const XrayReporter = (options, onPrepareDefer, onCompleteDefer, browser) => {
});
}
XrayService.createExecution(result, () => {
onCompleteDefer.fulfill();
if(onCompleteDefer.resolve){
onCompleteDefer.resolve();
} else {
onCompleteDefer.fulfill();
}
});
});
};
Expand Down

0 comments on commit 9d8f52c

Please sign in to comment.