package main import ( "github.com/gorilla/websocket" "sync" "testing" ) func TestWSServer(t *testing.T) { runWSServer("0.0.0.0:14725", "/ws") } func TestWSClient(t *testing.T) { ngin, nc := runWSClient("ws://127.0.0.1:14725/ws") _ = nc.Send(websocket.TextMessage, []byte("hello world!")) ngin.LogPrefix() var wg sync.WaitGroup wg.Add(1) wg.Wait() }