Skip to content

Commit 7fdff37

Browse files
author
DavertMik
committed
fixed tests
1 parent 851e690 commit 7fdff37

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/result.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Result {
4141
}
4242

4343
get failures() {
44-
return this._failures
44+
return this._failures.filter(f => f && (!Array.isArray(f) || f.length > 0))
4545
}
4646

4747
get stats() {

test/unit/worker_test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('Workers', function () {
2929
workers.run()
3030

3131
workers.on(event.all.result, result => {
32-
expect(result.hasFailed).equal(false)
32+
expect(result.hasFailed).equal(true)
3333
expect(passedCount).equal(5)
3434
expect(failedCount).equal(3)
3535
done()
@@ -101,7 +101,7 @@ describe('Workers', function () {
101101
})
102102

103103
workers.on(event.all.result, result => {
104-
expect(result.hasFailed).equal(false)
104+
expect(result.hasFailed).equal(true)
105105
expect(passedCount).equal(3)
106106
expect(failedCount).equal(2)
107107
done()

0 commit comments

Comments
 (0)