[−][src]Crate safina_async_test
A macro for running async fn
tests.
Runs tests with safina::block_on
.
Related crates:
safina
- safe async runtimesafina-timer
- safe async sleep functionssafina-async-test
- macro for running async tests
Limitations
- Requires Rust
nightly
because safina does
Examples
#[async_test] async fn test1() { an_async_fn().await.unwrap(); }
#[async_test] async fn test2() { safina::increase_threads_to(1); safina::spawn(Box::pin(background_task())); assert_eq!(42, do_request().await.unwrap()); }
Documentation
https://docs.rs/safina-async-test
Alternatives
Release Process
- Edit
Cargo.toml
and bump version number. - Run
./release.sh
Changelog
- v0.1.1 - First published version
TO DO
- DONE - Implement as declarative macro. UX is bad.
- DONE - Implement as procedural macro.
- DONE - Report errors nicely
- DONE - Drop finished futures
- Publish on crates.io
Attribute Macros
async_test |