If I have the following code:
var myfunc = function() { alert('wow'); };
var t=setTimeout(myfunc, 300);
Is there anything I can do with the id stored in t
to verify the timer's duration and callback? I'm trying to verify the timer's properties directly so I don't have to actually run it 'till timeout in my unit tests.