Crates.io | lite-async-test |
lib.rs | lite-async-test |
version | 0.1.3 |
source | src |
created_at | 2023-10-08 17:58:25.255309 |
updated_at | 2024-01-23 21:10:10.368501 |
description | An #![async_test] wrapper using futures-lite, for easily setting up async tests in your crates/binaries. |
homepage | |
repository | https://github.com/botanica-consulting/lite-async-test |
max_upload_size | |
id | 997339 |
size | 5,807 |
An #![async_test]
wrapper using futures-lite, for easily setting up async tests in your crates/binaries.
This is implemented using a very simple procedural macro which wraps the original test with an synchronous version which uses futures-lite to execute.
This crate is suitable for usage in no_std
targets.
To use, simply include
#[cfg(test)]
mod tests {
use super::*;
use lite_async_test::async_test;
#[async_test]
async fn some_test() {
assert_eq!(value, get_value().await);
}
}
Disclaimer: This library is not an official product, use freely at your own risk.