Crates.io | esso |
lib.rs | esso |
version | 1.0.0 |
source | src |
created_at | 2023-09-22 23:33:29.246783 |
updated_at | 2023-09-22 23:33:29.246783 |
description | Jest style tests in RUST |
homepage | https://github.com/jamhall/esso |
repository | https://github.com/jamhall/esso |
max_upload_size | |
id | 980954 |
size | 6,341 |
Esso is a small and simple crate offering a handy macro for writing tests, akin to Jest.
The idea behind it is to make it easier to read and write tests in Rust.
It accommodates both synchronous and asynchronous tests. Have a look at the it.rs
source code if you want to see what
the tests expand to it.
Synchronous example
it!("should check if a file exists", {
assert!(std::fs::metadata("/tmp/hello.txt").is_ok());
});
Asynchronous example
it!("should asynchronously check if a file exists", async {
assert!(tokio::fs::metadata("/tmp/hello.txt").await.is_ok());
});
[dependencies]
esso = "1.0.0"
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details