var raf = function (func) {
    return setTimeout(func, 1);
};

var caf = function (id) {
    return clearTimeout(id);
};

var raf = (function () {
    var startTime = Date.now();
    return function (callback) {
        return setTimeout(function () {
            callback(Date.now() - startTime);
        }, 1000/60);
    };
})();

var caf = clearTimeout;

Fix raf shim for test environment
Fix raf shim for test environment
