Jrest
The equivalent of Jest for Rust.
Jrest is a testing framework project for Rust, inspired by Jest, easy to write and easy to read, with fancy diffs when tests fail.
⚠️ Be aware that this is a work in progress.
But it should get regular updates since I'm using it every week on my own open-source projects.
Installation
Note https://crates.io/crates/rest is unfortunately squatted by a ghost. That's why I had to name it Jrest instead of Rest.
Usage
.to_be()
use expect;
Primitives
.to_be_greater_than()
use expect;
.to_be_greater_than_or_equal()
use expect;
.to_be_less_than()
use expect;
.to_be_less_than_or_equal()
use expect;
Strings
.to_start_with()
use expect;
.to_start_with()
use expect;
Roadmap
-
.toContain() -
.toHaveLength() -
.toMatch() -
.toMatchObject() -
.toThrow()