You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.
Hey there,
we've started adding websockets into our project a few days ago and I really enjoy using it. The API turned out to be great and being able to have middleware is amazing.
Our websocket use case is mostly very unidirectional from Server to Client. Let me give you an example:
User A sends a RESTful request to the Server
Server persists some things into the database and performs other actions.
Server then needs to notify Users B, C that something has changed.
As of now, all my REST api tests are api endpoint tests using trait('Test/ApiClient') and the testing experience + code confidence are incomparable to any other tests I write.
Ideally, I would like to also have a SocketClient trait so that I can register a fake socket Client to a channel, send some HTTP requests and then assert the messages received by my mocked socket Client.
Is there a better way of testing this and how would I go about mocking the Socket Client (which typically runs in the Browser) in node?
The text was updated successfully, but these errors were encountered:
Hey there,
we've started adding websockets into our project a few days ago and I really enjoy using it. The API turned out to be great and being able to have middleware is amazing.
Our websocket use case is mostly very unidirectional from Server to Client. Let me give you an example:
RESTful request
to theServer
Server
persists some things into the database and performs other actions.Server
then needs to notify Users B, C that something has changed.As of now, all my REST api tests are
api endpoint
tests usingtrait('Test/ApiClient')
and the testing experience + code confidence are incomparable to any other tests I write.Ideally, I would like to also have a
SocketClient
trait so that I can register a fakesocket Client
to achannel
, send some HTTP requests and then assert the messages received by my mockedsocket Client
.Is there a better way of testing this and how would I go about mocking the Socket Client (which typically runs in the Browser) in node?
The text was updated successfully, but these errors were encountered: