(t *testing.T)
| 50 | } |
| 51 | |
| 52 | func TestWsHandlerClose(t *testing.T) { |
| 53 | e := wsHandlerTester(t) |
| 54 | |
| 55 | ws := e.GET("/path").WithWebsocketUpgrade(). |
| 56 | Expect(). |
| 57 | Status(http.StatusSwitchingProtocols). |
| 58 | Websocket() |
| 59 | defer ws.Disconnect() |
| 60 | |
| 61 | ws.CloseWithText("Namárië...", websocket.CloseGoingAway). |
| 62 | Expect(). |
| 63 | CloseMessage().NoContent() |
| 64 | } |
| 65 | |
| 66 | func wsFastHandlerTester(t *testing.T) *httpexpect.Expect { |
| 67 | return httpexpect.WithConfig(httpexpect.Config{ |
nothing calls this directly
no test coverage detected
searching dependent graphs…