Skip to content

Commit

Permalink
fixed bug when setting test status in reporter (#3500)
Browse files Browse the repository at this point in the history
  • Loading branch information
prudhvi22 authored Nov 28, 2022
1 parent 1c0393f commit 7e6fc0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/reporter/results.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = class Results {
}

hasFailures() {
return this.currentTestResult.errors === 0 && this.currentTestResult.failed === 0;
return this.currentTestResult.errors > 0 || this.currentTestResult.failed > 0;
}

////////////////////////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions test/src/runner/testReporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ describe('testReporter', function() {
assert.ok(Object.keys(test).includes('status'));
assert.ok(Object.keys(test).includes('startTimestamp'));
assert.ok(Object.keys(test).includes('endTimestamp'));
assert.strictEqual(test.status, 'pass');
}
},
silent: true,
Expand Down

0 comments on commit 7e6fc0f

Please sign in to comment.