MCPcopy Create free account
hub / github.com/gavv/httpexpect / TestWsFastHandlerClose

Function TestWsFastHandlerClose

_examples/websocket_test.go:107–119  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

105}
106
107func TestWsFastHandlerClose(t *testing.T) {
108 e := wsFastHandlerTester(t)
109
110 ws := e.GET("/path").WithWebsocketUpgrade().
111 Expect().
112 Status(http.StatusSwitchingProtocols).
113 Websocket()
114 defer ws.Disconnect()
115
116 ws.CloseWithText("Namárië...", websocket.CloseGoingAway).
117 Expect().
118 CloseMessage().NoContent()
119}

Callers

nothing calls this directly

Calls 10

wsFastHandlerTesterFunction · 0.85
WebsocketMethod · 0.80
StatusMethod · 0.80
WithWebsocketUpgradeMethod · 0.80
GETMethod · 0.80
DisconnectMethod · 0.80
CloseMessageMethod · 0.80
CloseWithTextMethod · 0.80
ExpectMethod · 0.45
NoContentMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…