2 unstable releases
| 0.2.0 | Feb 13, 2022 |
|---|---|
| 0.1.0 | Jan 22, 2022 |
#1510 in Testing
7KB
115 lines
Fake Socket
Usage:
use tokio::sync::mpsc;
use axum::extract::ws::Message;
let (_tx1, rx1) = mpsc::unbounded_channel();
let (tx2, mut rx2) = mpsc::unbounded_channel();
let socket = FakeSocket::<Message, axum::Error>::new(rx1, tx2);
// use it as a websocket in your test
Dependencies
~2.5–4MB
~61K SLoC