Simulate a Network Error Using .intercept() Command

InstructorFilip Hric

Share this video with your friends

Send Tweet

You can simulate a network condition, where an http request does not make it to server. When that happens, you want to make sure the app is showing the user a correct message. By passing forceNetworkError attribute, you’ll be able to simulate such network conditions and see how application behaves under given circumstances.