Mocked out DOM, websocket and localStorage