Skip to content

Commit

Permalink
Support timeout mocks on ie8
Browse files Browse the repository at this point in the history
See http://www.adequatelygood.com/Replacing-setTimeout-Globally.html
for description of the problems and solutions.
Jasmine's boot.js already has this hack.

Fix karma-runner#41
  • Loading branch information
Sergey Tatarintsev committed Oct 31, 2014
1 parent 5c5f45d commit 328e81d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
return suite;
};

/**
* Setting up timing functions to be able to be overridden. Certain browsers (Safari, IE 8, phantomjs) require
* this hack.
*/
window.setTimeout = window.setTimeout;
window.setInterval = window.setInterval;
window.clearTimeout = window.clearTimeout;
window.clearInterval = window.clearInterval;


/**
* Build up the functions that will be exposed as the Jasmine
Expand Down

0 comments on commit 328e81d

Please sign in to comment.