4 releases

0.1.3 Feb 3, 2021
0.1.2 Nov 28, 2020
0.1.1 Oct 18, 2020
0.1.0 Oct 18, 2020

#9 in #surf

Download history 520/week @ 2023-11-26 560/week @ 2023-12-03 360/week @ 2023-12-10 295/week @ 2023-12-17 269/week @ 2023-12-24 432/week @ 2023-12-31 678/week @ 2024-01-07 549/week @ 2024-01-14 453/week @ 2024-01-21 574/week @ 2024-01-28 673/week @ 2024-02-04 450/week @ 2024-02-11 300/week @ 2024-02-18 305/week @ 2024-02-25 274/week @ 2024-03-03 95/week @ 2024-03-10

990 downloads per month
Used in fewer than 9 crates

MIT/Apache

7KB

tide-testing

a convenient bridge between surf and tide to generate synthetic requests for testing

Installation

$ cargo add -D tide-testing

Example usage:

let mut app = tide::new();
app.at("/").get(|_| async { Ok("hello!") });

use tide_testing::TideTestingExt;
assert_eq!(app.get("/").recv_string().await?, "hello!");
assert_eq!(
    app.post("/missing").await?.status(),
    tide::http::StatusCode::NotFound
);

Cargo Features:

Safety

This crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~11–24MB
~367K SLoC