|
From: beRt b. <beR...@al...> - 2005-01-11 13:45:05
|
Anybody an idea how we can do unittesting of asynchronous code? E.g.: when an image is loaded, I want to check if the right image is loaded. I tried to use setInterval to call a function that fails the test, and have the eventHandler clear the interval. Two problems arose: 1. tearDown doesn't wait for the eventhandler 2. sometimes, testcase seems to be freed before the eventHandler was called. Kind regards, Bert Bruynooghe. |