I'm writing acceptance tests for an ember application and the application works offline. I wanted to know if there was a way to force navigator.online to false to test certain behaviours when running tests.
Thanks!
You can use mocking.
Wrap the code navigator.online
in a service or a utility class. Use that class in your application. Use a mock implementation of this service for your tests.