jasmine.Clock() and window.clearInterval()

414 views
Skip to first unread message

fschwiet

unread,
Mar 28, 2011, 5:51:14 PM3/28/11
to Jasmine
Recent discussions brought jasmine.Clock to my attention. It looks
pretty nice. I wonder, how would people then verify
window.clearInterval is called? One approach might be to spy on
something called by the callback, let the timer interval pass (via
jasmine.Clock.tick) then verify the callback was not called.
Is there a cleaner way? I was hoping jasmine.Clock would have a
"how many timers exist currently" method that I could use to verify a
timer was removed.

Rajan Agaskar

unread,
Apr 1, 2011, 9:21:30 AM4/1/11
to jasmi...@googlegroups.com, fschwiet
Does spyOn(window, "clearInterval").andCallThrough() not work in this situation?


--
You received this message because you are subscribed to the Google Groups "Jasmine" group.
To post to this group, send email to jasmi...@googlegroups.com.
To unsubscribe from this group, send email to jasmine-js+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jasmine-js?hl=en.


Reply all
Reply to author
Forward
0 new messages