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

Method Type

websocket_message.go:185–192  ·  view source on GitHub ↗

Type succeeds if WebSocket message type is one of the given. WebSocket message types are defined in RFC 6455, section 11.8. See also https://godoc.org/github.com/gorilla/websocket#pkg-constants Example: msg := conn.Expect() msg.Type(websocket.TextMessage, websocket.BinaryMessage)

(types ...int)

Source from the content-addressed store, hash-verified

183// msg := conn.Expect()
184// msg.Type(websocket.TextMessage, websocket.BinaryMessage)
185func (wm *WebsocketMessage) Type(types ...int) *WebsocketMessage {
186 opChain := wm.chain.enter("Type()")
187 defer opChain.leave()
188
189 wm.checkType(opChain, types...)
190
191 return wm
192}
193
194// NotType succeeds if WebSocket message type is none of the given.
195//

Calls 3

checkTypeMethod · 0.95
enterMethod · 0.80
leaveMethod · 0.80