sweet
Very early stage warning! No ongoing maintenance is guaranteed
Basically a jest clone, the sweet crate will set you up with a beautiful test harness and intuitive matchers that are easy on the eyes.
Quickstart
- edit
cargo.toml[] = # current version here [[]] = "sweet" = "test/sweet.rs" = false - create file
test/sweet.rspub use *; sweet! - run these commands
Features
- Nested Tests
-
Sweet is designed to collect and run all tests in one go. All tests exposed in the
sweet.rsfile will be run://test/sub_dir/some_test.rs sweet! //test/sub_dir/mod.rs
-
- Pretty success messages
- In progress indication
- Failure context
Example Commands
- Run
cargo test --test sweet
- With watch
cargo watch -q -x 'test --test sweet -- -w'- Clears terminal on each run
- Returns an exit code zero (cleaner output)
- Specify filename
cargo test --test sweet -- my_test
Reference
- jest
- demonstrate
- speculate
- Nicer syntax


