ec27dbff by David LaPalomento

Test that nothing is scheduled once the queue is empty

When the final item in the queue is processed, no additional callbacks should be scheduled to run.
1 parent 7c3935d5
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
48 48
49 callbacks.shift()(); 49 callbacks.shift()();
50 strictEqual(1, callbacks.length, 'the next task is scheduled'); 50 strictEqual(1, callbacks.length, 'the next task is scheduled');
51
52 callbacks.shift()();
53 strictEqual(1, callbacks.length, 'nothing is scheduled on an empty queue');
51 }); 54 });
52 55
53 test('can be emptied at any time', function() { 56 test('can be emptied at any time', function() {
......