diff options
Diffstat (limited to 'test/priorityQueue.js')
-rw-r--r-- | test/priorityQueue.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/priorityQueue.js b/test/priorityQueue.js index 96936fd..564a0d6 100644 --- a/test/priorityQueue.js +++ b/test/priorityQueue.js @@ -49,8 +49,15 @@ describe('priorityQueue', () => { ]); expect(q.concurrency).to.equal(1); expect(q.length()).to.equal(0); - done(); + q.push([]) + expect(q.length()).to.equal(0) + done() }); + try { + q.push(5, 5, 'NOT_A_FUNCTION') + } catch(e) { + expect(e.message).to.equal('task callback must be a function') + } }); it('concurrency', (done) => { @@ -276,4 +283,3 @@ describe('priorityQueue', () => { q.push([], 1, () => {}); }); }); - |