How to write async test that use XHR?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to write async test that use XHR?

NorbertHartl
I found the SUnitAsyncTest class and the #async: But I have troubles to see what use cases this is good for. It seems like using async: some still needs to do timeout handling. The "right" solution would be to hook into the success/fail blocks but that is not possible everytime.

Any hints?

Norbert

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: How to write async test that use XHR?

Herby Vojčík
It is always possible. You set the maximum timeout after which the test fails, but otherwise you do whatever you want and should either fail some assertion or mark the test finished.

Norbert Hartl wrote:
> I found the SUnitAsyncTest class and the #async: But I have troubles to see what use cases this is good for. It seems like using async: some still needs to do timeout handling. The "right" solution would be to hook into the success/fail blocks but that is not possible everytime.
>
> Any hints?
>
> Norbert
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.