Skip to main content
Participant
June 16, 2009
Question

Testing asynchronous callback functions

  • June 16, 2009
  • 1 reply
  • 1994 views

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.

This topic has been closed for replies.

1 reply

Participating Frequently
July 27, 2009

Geoff,

Sorry this has gone unanswered. There are several new async methods that will be making an appearance in the upcoming beta 2. I think these will solve your issue.

Mike

Participant
October 2, 2009

Hi, I've come across the same issue. We are using a socket server with a special protocol and aren't passing events. Is there any way to use a callback function that doesn't return an event?