We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 20466e8 commit bb05522Copy full SHA for bb05522
tests/ws.rs
@@ -81,6 +81,21 @@ async fn binary() {
81
assert_eq!(msg.as_bytes(), &b"bonk"[..]);
82
}
83
84
+#[tokio::test]
85
+async fn wsclient_sink_and_stream() {
86
+ let _ = pretty_env_logger::try_init();
87
+
88
+ let mut client = warp::test::ws()
89
+ .handshake(ws_echo())
90
+ .await
91
+ .expect("handshake");
92
93
+ let message = warp::ws::Message::text("hello");
94
+ SinkExt::send(&mut client, message.clone()).await.unwrap();
95
+ let received_message = client.next().await.unwrap().unwrap();
96
+ assert_eq!(message, received_message);
97
+}
98
99
#[tokio::test]
100
async fn close_frame() {
101
let _ = pretty_env_logger::try_init();
0 commit comments