Hi all,
Many of my current tests use the JS Unit Mock Timeout to provide a
method for simulating time (useful for ajax requests, time limited use
interaction, etc).
See this Google Testing Blog post for more details:
http://googletesting.blogspot.com/2007/03/javascript-simulating-time-in-jsunit.html
At the moment JS Test Driver does not work with the JS Unit Mock
Timeout (jsUnitMockTimeout.js) file. It uses timeouts as part of it's
control mechanism, and these fail to work when we include
jsUnitMockTimeout.js, as it overwrites the setTimeout (and other)
methods with it's own mocks.
I'm not sure of the best way to fix this, but I was thinking that JS
Test Driver could make it's own copies of the setTimeout,
clearTimeout, setInterval, clearInterval methods and use those at all
times. Then the mock timeout framework can be included without any
problems.
What are peoples thoughts on this?