javascript - How to generate a websocket error -
i writing library has server , client components use websockets transport. i'm testing on variety of browsers , need test behaviors tied errors , sockets unexpectedly closing.
is there way cause error in websocket (aside trying connect invalid url/non-websocket server)?
note: not unit testing. need test how clients interact servers, within different browsers, mocking websockets not option.
you either close connection server side (in non-graceful manner) or might able stick proxy in middle (http://www.telerik.com/fiddler) , use clip socket if possible.
Comments
Post a Comment