-
Notifications
You must be signed in to change notification settings - Fork 119
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
Enable and disable MockSocket at runtime #361
Comments
SerkanSipahi
changed the title
Enable and disable MockSocket
Enable and disable MockSocket at runtime!
May 7, 2022
SerkanSipahi
changed the title
Enable and disable MockSocket at runtime!
Enable and disable MockSocket at runtime
May 7, 2022
I think I've found what I'm looking for, We should add this to the documentation (README.md). If that is ok, I would create a MR for this. mockWebsocket (enable)Lines 46 to 51 in 54ba9ce
restoreWebsocket (disable)Lines 56 to 63 in 54ba9ce
|
@SerkanSipahi Yep, it is. Go on, you can create a pull request for this |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would like to switch between a mocked socket and a real websocket during development in the frontend. For this reason I am looking for a way to switch the mock socket on and off at runtime.
Unfortunately, I did not find anything in the documentation on how to achieve this. Is it possible to achieve this with the Server.stop(...) method because internally this method takes something out of the
networkBridge.removeServer(this.url)
? Probably not because the global real websocket is overwritten by the mock. What is the right way here?Thank you very much in advance.
The text was updated successfully, but these errors were encountered: