Skip to content

Commit

Permalink
Added missed branch execution coverage for task queue
Browse files Browse the repository at this point in the history
  • Loading branch information
etki committed Aug 14, 2017
1 parent f6d486d commit 3e030a7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/suites/integration/concurrent/TaskQueue.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,10 @@ describe('Integration', function () {
expect(paused).to.be.true
})
})

it('correctly executes if there is no current task', function () {
return TaskQueue.started().pause()
})
})

describe('#close', function () {
Expand Down Expand Up @@ -373,6 +377,16 @@ describe('Integration', function () {
expect(result).to.deep.eq(expectation)
})
})

it('tolerates non-error rejection', function () {
var value = {}
var rejected = Promise.reject(value)
var queue = TaskQueue.started()
var task = queue.push(function () {
return rejected
})
return expect(task).to.eventually.be.rejectedWith(value)
})
})
})

Expand Down

0 comments on commit 3e030a7

Please sign in to comment.