Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Make jasmine run at full speed when in a background tab
var foregroundScreenRefreshRate = 1500;
var backgroundScreenRefreshRate = 9000;
jasmine.getEnv().updateInterval = foregroundScreenRefreshRate;
$(window).focus(function() {
jasmine.getEnv().updateInterval = foregroundScreenRefreshRate;
});
$(window).blur(function() {
jasmine.getEnv().updateInterval = backgroundScreenRefreshRate;
});
@mark-rushakoff

Deleting the update interval actually caused the blur/focus event to never get called until specs were over. Oops!

A background timeout of 9000 was arbtitrarily chosen because the default max script limit in Firefox is 10 seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.