forky_test 0.1.1

Rust Utilities
Documentation

Forky Test

Super early beta mode warning!!!

Basically a jest clone, the forky_test crate will set you up with a beautiful test harness and intuitive matchers that are easy on the eyes.

  • Features
    • Pretty success messages success
    • In progress indicator progress
    • Failure context logging failure

Getting started

Add the following files:

Cargo.toml

[[test]]
name = "forky"
path = "tests/main.rs"
harness = false

tests/main.rs

use forky_test::*;
mod my_test;

fn main() -> Result<(), MatcherError> {
	TestRunner::run()
}

tests/my_test.rs

use forky_test::*;

describe!("my test", |s| {
	s.it("works", || {
		expect(true).to_be_false()?;

		Ok(())
	});
});

Commands

  • Run
    • cargo test --test forky
  • With watch
    • cargo watch -q -x 'test --test forky -- -w'
    • Clears terminal on each run
    • Returns an exit code zero (cleaner)
  • Specify filename
    • cargo test --test forky -- my_test