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
I went through the whole book - it was really awesome, but when I started my first bigger project I just can't apply it.
I planned an application, where whenever an user visits a website, the site connect to the websocket server, and the golang websocket server broadcasts the number of active connections to every active websocket client, every x second. I've a hub type that stores all the connections.
I started testing by small steps - testing the ws connection, making the websocket return the number of active connection whenever a client joins, but stuck with testing the broadcast functionality.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I went through the whole book - it was really awesome, but when I started my first bigger project I just can't apply it.
I planned an application, where whenever an user visits a website, the site connect to the websocket server, and the golang websocket server broadcasts the number of active connections to every active websocket client, every x second. I've a hub type that stores all the connections.
I started testing by small steps - testing the ws connection, making the websocket return the number of active connection whenever a client joins, but stuck with testing the broadcast functionality.
How would you TDD such application?
Repo: https://github.com/enkeyz/websock-usercount
Beta Was this translation helpful? Give feedback.
All reactions