Skip to content
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

How to mock client, not server? #304

Open
raxod502 opened this issue Jul 29, 2020 · 0 comments
Open

How to mock client, not server? #304

raxod502 opened this issue Jul 29, 2020 · 0 comments

Comments

@raxod502
Copy link

I have a websocket server which needs to be tested. I pass it a WebSocket object from node-ws, and it communicates with the client using that object. Normally the object is obtained from express-ws routing, but for testing it should be WebSocket from mock-socket. However, I cannot figure out how I am supposed to get any information out of the WebSocket object from mock-socket after passing it to my server. Does this library only support mocking servers and not clients? It is hard to tell because the README does not really document what is supposed to be supported, nor is there any API reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant