diff --git a/xray-reporter.js b/xray-reporter.js index 7fc9886..63661a9 100644 --- a/xray-reporter.js +++ b/xray-reporter.js @@ -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 = []; @@ -188,7 +192,11 @@ const XrayReporter = (options, onPrepareDefer, onCompleteDefer, browser) => { }); } XrayService.createExecution(result, () => { - onCompleteDefer.fulfill(); + if(onCompleteDefer.resolve){ + onCompleteDefer.resolve(); + } else { + onCompleteDefer.fulfill(); + } }); }); };