diff options
author | Alexander Early <alexander.early@gmail.com> | 2016-03-22 15:47:38 -0700 |
---|---|---|
committer | Alexander Early <alexander.early@gmail.com> | 2016-03-22 15:47:38 -0700 |
commit | 1dec998392e58a74c452d826d83af48db30f3eb0 (patch) | |
tree | 9d7491cad669cf4ec3c9017ab09512d298934164 /mocha_test/priorityQueue.js | |
parent | 6dd08eed9f15ed6b986a83c0f849394118f98e91 (diff) | |
download | async-1dec998392e58a74c452d826d83af48db30f3eb0.tar.gz |
changed saturated and unsaturated to better reflect reality
Diffstat (limited to 'mocha_test/priorityQueue.js')
-rw-r--r-- | mocha_test/priorityQueue.js | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/mocha_test/priorityQueue.js b/mocha_test/priorityQueue.js index 9ed74c6..fa5cfce 100644 --- a/mocha_test/priorityQueue.js +++ b/mocha_test/priorityQueue.js @@ -139,8 +139,8 @@ describe('priorityQueue', function() { var calls = []; var q = async.priorityQueue(function(task, cb) { calls.push('process ' + task); - async.setImmediate(cb); - }, 10); + setTimeout(cb, 10); + }, 4); q.unsaturated = function() { calls.push('unsaturated'); }; @@ -151,18 +151,21 @@ describe('priorityQueue', function() { 'unsaturated', 'unsaturated', 'unsaturated', - 'unsaturated', - 'unsaturated', 'process foo4', 'process foo3', 'process foo2', 'process foo1', - 'process foo0', 'foo4 cb', + 'unsaturated', + 'process foo0', 'foo3 cb', + 'unsaturated', 'foo2 cb', + 'unsaturated', 'foo1 cb', - 'foo0 cb' + 'unsaturated', + 'foo0 cb', + 'unsaturated' ]); done(); }, 50); |