summaryrefslogtreecommitdiff
path: root/test/priorityQueue.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/priorityQueue.js')
-rw-r--r--test/priorityQueue.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/priorityQueue.js b/test/priorityQueue.js
index 1a8cc76..c3ece02 100644
--- a/test/priorityQueue.js
+++ b/test/priorityQueue.js
@@ -239,7 +239,7 @@ describe('priorityQueue', () => {
q.push('foo4', 1, () => {calls.push('foo4 cb');});
});
});
-
+
it('should not call the drain callback if receives empty push and tasks are still pending', (done) => {
var call_order = [];
@@ -247,21 +247,21 @@ describe('priorityQueue', () => {
call_order.push('process ' + task);
callback('error', 'arg');
}, 1);
-
+
q.push(1, 1, (err, arg) => {
expect(err).to.equal('error');
expect(arg).to.equal('arg');
call_order.push('callback ' + 1);
});
-
+
q.push(2, 1, (err, arg) => {
expect(err).to.equal('error');
expect(arg).to.equal('arg');
call_order.push('callback ' + 2);
});
-
+
expect(q.length()).to.equal(2);
-
+
q.drain = function () {
expect(call_order).to.eql([
'process 1', 'callback 1',
@@ -272,7 +272,7 @@ describe('priorityQueue', () => {
expect(q.running()).to.equal(0);
done();
};
-
+
q.push([], 1, () => {});
});
});