Skip to content

Enable and disable MockSocket at runtime #361

@SerkanSipahi

Description

@SerkanSipahi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions