19 unstable releases (9 breaking)
Uses new Rust 2024
| 0.10.0 | May 21, 2026 |
|---|---|
| 0.8.0 | May 2, 2026 |
| 0.7.0 | May 30, 2024 |
| 0.6.0 | Mar 22, 2024 |
| 0.3.0 |
|
#1839 in HTTP server
1,254 downloads per month
Used in 13 crates
2MB
41K
SLoC
🧪 trillium-testing — test utilities for Trillium apps
Testing utilities for Trillium applications. Provides assertion macros (assert_ok!, assert_status!, assert_response!, assert_not_handled!), a TestConn builder for constructing requests, and a synchronous test runner — no real TCP listener needed. Enable one of the tokio, smol, or async-std cargo features to select the async runtime.
Example
use trillium::Conn;
use trillium_testing::prelude::*;
async fn handler(conn: Conn) -> Conn {
conn.ok("hello testing")
}
assert_ok!(get("/").on(&handler), "hello testing");
assert_not_handled!(get("/").on(&()));
Safety
This crate uses #![forbid(unsafe_code)].
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
~10–19MB
~395K SLoC