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

How can I emulate the Offline mode? #87

Closed
ilko222 opened this issue Sep 7, 2021 · 1 comment
Closed

How can I emulate the Offline mode? #87

ilko222 opened this issue Sep 7, 2021 · 1 comment

Comments

@ilko222
Copy link

ilko222 commented Sep 7, 2021

Hello!
We are using this library on our project to check Internet connectivity.

I need to create some autotests for our App in the Offline mode w/o a real turning server to the Offline state.
I tried to set the default response timeout to 1 ms and seems it's working. But not really good for my purposes. Because we are using App build on that server and I need to restart the App all the time when I need to switch Offline/Online mode. I would like to do this "on the fly".

Is it possible?
How?

@sindresorhus
Copy link
Owner

Your best bet is probably mocking.

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