Skip to content

Commit d3e58a6

Browse files
committed
Moving the method in the promise
1 parent 545f7d8 commit d3e58a6

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

bin/helpers/sync/specsSummary.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@ const logger = require("../logger").syncCliLogger;
1717
// ]
1818
//
1919
let printSpecsRunSummary = (data, time, machines) => {
20-
let summary = {
21-
total: 0,
22-
failed: 0,
23-
passed: 0,
24-
skipped: 0
25-
};
20+
return new Promise((resolve, _reject) => {
21+
let summary = {
22+
total: 0,
23+
failed: 0,
24+
passed: 0,
25+
skipped: 0
26+
};
2627

27-
data.forEach((spec) => {
28-
specSummaryCount(summary, spec.status.toLowerCase());
29-
});
28+
data.forEach((spec) => {
29+
specSummaryCount(summary, spec.status.toLowerCase());
30+
});
3031

31-
logger.info(`Total tests: ${summary.total}, passed: ${summary.passed}, failed: ${summary.failed}, skipped: ${summary.skipped}`);
32-
logger.info(`Done in ${time} using ${machines} machines\n`);
32+
logger.info(`Total tests: ${summary.total}, passed: ${summary.passed}, failed: ${summary.failed}, skipped: ${summary.skipped}`);
33+
logger.info(`Done in ${time} using ${machines} machines\n`);
3334

34-
return new Promise((resolve, _reject) => {
3535
resolve(data);
3636
})
3737
};

0 commit comments

Comments
 (0)