Testing asynchronous callback functions
I have been creating a test suite for an API that my company has been developing and have run into a bit of a snag trying to create tests for a couple of our async callback functions. I have tested a number of our async events properly using the addEventListener and addAsync combination and they have worked brilliantly, but these last couple are slightly different.
The issue I am running into now is that these problematic async callbacks are not firing an event but just returning a url and so the function signature doesn't match what is expected by the addEventListener/addAsync combination I had been using so far for testing. Is there a different approach required to test an asynchronous method that is not firing an event??
Thanks in advance for your help.
