pub fn with_server<H, Fun, Fut>(handler: H, tests: Fun)
where H: Handler, Fun: FnOnce(Url) -> Fut, Fut: Future<Output = Result<(), Box<dyn Error>>>,
Expand description

Starts a trillium handler bound to a random available port on localhost, run the async tests provided as the second argument, and then shut down the server. useful for full integration tests that actually exercise the tcp layer.

See trillium_client::Conn for usage examples.