Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible to wait to respond to request? #60

Open
davbeck opened this issue Mar 29, 2021 · 2 comments
Open

Possible to wait to respond to request? #60

davbeck opened this issue Mar 29, 2021 · 2 comments

Comments

@davbeck
Copy link

davbeck commented Mar 29, 2021

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.

@JanGorman
Copy link
Owner

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?

@davbeck
Copy link
Author

davbeck commented Apr 7, 2021

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants