Hippolyte icon indicating copy to clipboard operation
Hippolyte copied to clipboard

Possible to wait to respond to request?

Open davbeck opened this issue 4 years ago • 2 comments

Hippolyte has worked great for testing a lot of different scenarios in our app, but there's one thing I haven't figured out how to test for, and that's behavior while a network request is in flight. For instance, I have a class that returns in flight tasks if the same file is requested again. Another class needs to handle cancellation while a request is in progress.

For other async operations that I've stubbed I'd do the following:

  • stub request in a pending state
  • perform the operation that uses the request
  • make checks or actions based on a pending request state
  • resume request stub

Hippolyte has a pause method, but from what I understand that just stops it from responding to requests temporarily.

davbeck avatar Mar 29 '21 15:03 davbeck

Hi @davbeck,

Sorry that it's taken so long for me to write. If I understood the issue correctly, what you want to achieve is to "slow down" the response to a request so that you can catch it as in-flight or even fully suspend it, is that correct?

JanGorman avatar Apr 06 '21 09:04 JanGorman

Yes

davbeck avatar Apr 07 '21 17:04 davbeck