Skip to content

Commit

Permalink
Merge pull request #28 from oshulimov-ontarget/master
Browse files Browse the repository at this point in the history
Fix #27 Pending tests marks suite as failed
  • Loading branch information
christian-bromann committed Aug 3, 2022
2 parents e0093f5 + 5c53249 commit d26b3e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ class WdioTeamcityReporter extends WdioReporter {
onSuiteEnd (suiteStats) {
const pendingTests = Object.values(suiteStats.tests).filter(test => test.state === 'pending');
pendingTests.forEach(testStat => {
testStat.error = testStat.error || {
message: 'Test is considered as failed, as it is still "pending" on suite end.',
stack: '',
};
this._m('##teamcity[testFailed name=\'{name}\' message=\'{error}\' details=\'{stack}\' flowId=\'{id}\']', testStat);
this._m('##teamcity[testIgnored name=\'{name}\' message=\'skipped\' flowId=\'{id}\']', testStat);
});

this._m('##teamcity[testSuiteFinished name=\'{name}\' flowId=\'{id}\']', suiteStats);
Expand Down

0 comments on commit d26b3e5

Please sign in to comment.