Skip to content

Commit 721b7c4

Browse files
committed
linting fixes
1 parent 110767d commit 721b7c4

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

browserstack-report-action/config/constants.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ module.exports = {
2222

2323
// Report statuses
2424
REPORT_STATUS: {
25-
IN_PROGRESS: 'in_progress',
26-
COMPLETE: 'complete',
27-
TESTS_AVAILABLE: 'tests_available',
28-
NOT_AVAILABLE: 'not_available',
29-
BUILD_NOT_FOUND: 'build_not_found',
30-
MORE_THAN_ONE_BUILD_FOUND: 'more_than_one_build_found',
25+
IN_PROGRESS: 'IN_PROGRESS',
26+
COMPLETED: 'COMPLETED',
27+
TESTS_AVAILABLE: 'TEST_AVAILABLE',
28+
NOT_AVAILABLE: 'NOT_AVAILABLE',
29+
BUILD_NOT_FOUND: 'BUILD_NOT_FOUND',
30+
MULTIPLE_BUILD_FOUND: 'MULTIPLE_BUILD_FOUND',
3131
},
3232

3333
// Integration types

browserstack-report-action/dist/index.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ module.exports = {
2828

2929
// Report statuses
3030
REPORT_STATUS: {
31-
IN_PROGRESS: 'in_progress',
32-
COMPLETE: 'complete',
33-
TESTS_AVAILABLE: 'tests_available',
34-
NOT_AVAILABLE: 'not_available',
35-
BUILD_NOT_FOUND: 'build_not_found',
36-
MORE_THAN_ONE_BUILD_FOUND: 'more_than_one_build_found',
31+
IN_PROGRESS: 'IN_PROGRESS',
32+
COMPLETED: 'COMPLETED',
33+
TESTS_AVAILABLE: 'TEST_AVAILABLE',
34+
NOT_AVAILABLE: 'NOT_AVAILABLE',
35+
BUILD_NOT_FOUND: 'BUILD_NOT_FOUND',
36+
MULTIPLE_BUILD_FOUND: 'MULTIPLE_BUILD_FOUND',
3737
},
3838

3939
// Integration types
@@ -38752,11 +38752,12 @@ class ReportService {
3875238752
});
3875338753

3875438754
const status = reportData.reportStatus;
38755-
if (status === 'COMPLETED' || status === 'TEST_AVAILABLE') {
38755+
if (status === constants.REPORT_STATUS.COMPLETED
38756+
|| status === constants.REPORT_STATUS.TESTS_AVAILABLE) {
3875638757
return reportData;
3875738758
}
3875838759

38759-
if (status === 'IN_PROGRESS' && retries < maxRetries) {
38760+
if (status === constants.REPORT_STATUS.IN_PROGRESS && retries < maxRetries) {
3876038761
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
3876138762
return poll(retries + 1);
3876238763
}

browserstack-report-action/src/services/ReportService.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,12 @@ class ReportService {
4949
});
5050

5151
const status = reportData.reportStatus;
52-
if (status === 'COMPLETED' || status === 'TEST_AVAILABLE') {
52+
if (status === constants.REPORT_STATUS.COMPLETED
53+
|| status === constants.REPORT_STATUS.TESTS_AVAILABLE) {
5354
return reportData;
5455
}
5556

56-
if (status === 'IN_PROGRESS' && retries < maxRetries) {
57+
if (status === constants.REPORT_STATUS.IN_PROGRESS && retries < maxRetries) {
5758
await new Promise((resolve) => setTimeout(resolve, pollingInterval * 1000));
5859
return poll(retries + 1);
5960
}

0 commit comments

Comments
 (0)