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

Function TestWsFastHandlerText

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

Source from the content-addressed store, hash-verified

75}
76
77func TestWsFastHandlerText(t *testing.T) {
78 e := wsFastHandlerTester(t)
79
80 ws := e.GET("/path").WithWebsocketUpgrade().
81 Expect().
82 Status(http.StatusSwitchingProtocols).
83 Websocket()
84 defer ws.Disconnect()
85
86 ws.WriteText("hi").
87 Expect().
88 TextMessage().Body().IsEqual("hi")
89}
90
91func TestWsFastHandlerJSON(t *testing.T) {
92 e := wsFastHandlerTester(t)

Callers

nothing calls this directly

Calls 11

wsFastHandlerTesterFunction · 0.85
WebsocketMethod · 0.80
StatusMethod · 0.80
WithWebsocketUpgradeMethod · 0.80
GETMethod · 0.80
DisconnectMethod · 0.80
TextMessageMethod · 0.80
WriteTextMethod · 0.80
ExpectMethod · 0.45
IsEqualMethod · 0.45
BodyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…