Skip to content

Commit

Permalink
fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Jan 19, 2025
1 parent 851e690 commit 7fdff37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/result.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Result {
}

get failures() {
return this._failures
return this._failures.filter(f => f && (!Array.isArray(f) || f.length > 0))
}

get stats() {
Expand Down
4 changes: 2 additions & 2 deletions test/unit/worker_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Workers', function () {
workers.run()

workers.on(event.all.result, result => {
expect(result.hasFailed).equal(false)
expect(result.hasFailed).equal(true)
expect(passedCount).equal(5)
expect(failedCount).equal(3)
done()
Expand Down Expand Up @@ -101,7 +101,7 @@ describe('Workers', function () {
})

workers.on(event.all.result, result => {
expect(result.hasFailed).equal(false)
expect(result.hasFailed).equal(true)
expect(passedCount).equal(3)
expect(failedCount).equal(2)
done()
Expand Down

0 comments on commit 7fdff37

Please sign in to comment.