use wasm_bindgen_test::wasm_bindgen_test;
#[wasm_bindgen_test]
async fn example() {
use futures_util::{SinkExt, StreamExt};
use websocket_web::{CloseCode, WebSocket};
let mut socket = WebSocket::connect("ws://127.0.0.1:8765").await.unwrap();
socket.send("Test123").await.unwrap();
let msg = socket.next().await.unwrap().unwrap();
assert_eq!(msg.to_string(), "Test123");
socket.close_with_reason(CloseCode::NormalClosure, "Goodbye!");
}