esso

Crates.ioesso
lib.rsesso
version1.0.0
sourcesrc
created_at2023-09-22 23:33:29.246783
updated_at2023-09-22 23:33:29.246783
descriptionJest style tests in RUST
homepagehttps://github.com/jamhall/esso
repositoryhttps://github.com/jamhall/esso
max_upload_size
id980954
size6,341
Jamie Hall (jamhall)

documentation

README

esso

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.

Example

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());
});

Installation

[dependencies]
esso = "1.0.0"

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details

Commit count: 2

cargo fmt