This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the equivalent of the old waitsFor/runs syntax | |
// which was removed from Jasmine 2 | |
waitsForAndRuns = function(escapeFunction, runFunction, escapeTime) { | |
// check the escapeFunction every millisecond so as soon as it is met we can escape the function | |
var interval = setInterval(function() { | |
if (escapeFunction()) { | |
clearMe(); | |
runFunction(); | |
} | |
}, 1); |