Skip to content

Commit deff51d

Browse files
committed
clean up some promises
1 parent 7867925 commit deff51d

File tree

2 files changed

+3
-33
lines changed

2 files changed

+3
-33
lines changed

bin/commands/runs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ module.exports = function run(args) {
6969
if (args.sync) {
7070
syncRunner.pollBuildStatus(bsConfig, data).then((exitCode) => {
7171
utils.sendUsageReport(bsConfig, args, `${message}\n${dashboardLink}`, Constants.messageTypes.SUCCESS, null);
72+
logger.info(Constants.userMessages.BUILD_REPORT_MESSAGE);
73+
logger.info(data.dashboard_url)
7274
process.exit(exitCode);
7375
});
7476
}

bin/helpers/syncRunner.js

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,8 @@ exports.pollBuildStatus = (bsConfig, buildDetails) => {
2121
resolve(successExitCode); // exit code 0
2222
}).catch((nonZeroExitCode) => {
2323
resolve(nonZeroExitCode); // exit code 1
24-
}).finally(() => {
25-
logger.info(Constants.userMessages.BUILD_REPORT_MESSAGE);
26-
logger.info(`${Config.dashboardUrl}${buildDetails.dashboard_url}`);
27-
});
24+
})
2825
});
29-
// logBuildDetails(bsConfig, buildDetails);
30-
// syncSpecsLogs.printSpecsStatus(bsConfig, buildDetails).then((data) => {
31-
// return specsSummary.printSpecsRunSummary(data.specs, data.duration, buildDetails.machines);
32-
// }).then((data) => {
33-
// return specDetails.failedSpecsDetails(data);
34-
// }).then((successExitCode) => {
35-
// return resolveExitCode(successExitCode); // exit code 0
36-
// }).catch((nonZeroExitCode) => {
37-
// return resolveExitCode(nonZeroExitCode); // exit code 1
38-
// }).finally(() => {
39-
// logger.info(Constants.userMessages.BUILD_REPORT_MESSAGE);
40-
// logger.info(`${Config.dashboardUrl}${buildDetails.dashboard_url}`);
41-
// });
4226
};
4327

4428
let logBuildDetails = (bsConfig, buildDetails) => {
@@ -53,19 +37,3 @@ let logBuildDetails = (bsConfig, buildDetails) => {
5337
logger.info(parallelMessage);
5438
logger.info(`BrowserStack Dashboard: ${buildDetails.dashboard_url}`);
5539
};
56-
57-
let printSpecsStatus = () => {
58-
return new Promise(function (resolve, reject) {
59-
resolve();
60-
});
61-
};
62-
63-
let printSpecsRunSummary = () => {
64-
return new Promise(function (resolve, reject) {
65-
resolve();
66-
});
67-
};
68-
69-
let resolveExitCode = (exitCode) => {
70-
return new Promise((resolve, _reject) => { resolve(exitCode) });
71-
};

0 commit comments

Comments
 (0)