Merge branch 'autotickuninstall' of https://github.com/atscott/jasmine
Merges #2057 from @atscott
This commit is contained in:
@@ -3125,6 +3125,10 @@ getJasmineRequireObj().Clock = function() {
|
||||
* @function
|
||||
*/
|
||||
this.uninstall = function() {
|
||||
// Ensure auto ticking loop is aborted when clock is uninstalled
|
||||
if (tickMode.mode === 'auto') {
|
||||
tickMode = { mode: 'manual', counter: tickMode.counter + 1 };
|
||||
}
|
||||
delayedFunctionScheduler = null;
|
||||
mockDate.uninstall();
|
||||
replace(global, realTimingFunctions);
|
||||
|
||||
Reference in New Issue
Block a user