1 stable release

1.0.0 Sep 22, 2023

#1037 in Procedural macros

22 downloads per month

MIT license

5KB
71 lines

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

Dependencies

~0.9–1.4MB
~27K SLoC