     assert.equal(callCount3, 0);
      done();
    }, 250);
  });

});

suite('Queueing functions to run before the next paint', function() {

  test('The queued function runs.', function(done) {
    var callback = sinon.spy();
    animationFrame.run(callback);
    requestAnimationFrame(function() {
      assert.isTrue(callback.calledOnce);
      done();
    });
  });

  test('Functions queued multiple times are run multiple times.', function(done) {
    var callback = sinon.spy();
    animationFrame.run(c