Function resetAdminServer

  • Reset a remote admin server, shutting down all Mockttp servers controlled by that admin server. This is equivalent to calling client.stop() for all remote clients of the target server.

    This can be useful in some rare cases, where a client might fail to reliably tear down its own server, e.g. in Cypress testing. In this case, it's useful to reset the admin server completely remotely without needing access to any previous client instances, to ensure all servers from previous test runs have been shut down.

    After this is called, behaviour of any previously connected clients is undefined, and it's likely that they may throw errors or experience other undefined behaviour. Ensure that client.stop() has been called on all active clients before calling this method.

    Parameters

    Returns Promise<void>