Crate fluent_test

Source
Expand description

FluentTest: A fluent, Jest-like testing library for Rust

This crate provides a more expressive way to write tests in Rust, inspired by JavaScript testing frameworks like Jest.

By default, assertions behave like standard Rust assertions. Enable enhanced output with:

// In your test code:
use fluent_test::prelude::*;

fn my_test() {
    // Enable enhanced output for this test
    fluent_test::config().enhanced_output(true).apply();
     
    expect!(2 + 2).to_equal(4);
}

Or set the FLUENT_TEST_ENHANCED_OUTPUT=true environment variable.

Re-exports§

pub use config::initialize;
pub use crate::config::Config;

Modules§

backend
Backend module for test evaluation and result generation
config
events
frontend
Frontend module for rendering test results
matchers
Matcher traits module for bringing the traits into scope
prelude
Main prelude module containing everything needed for fluent testing

Macros§

expect
Main entry point for fluent assertions
expect_not
Shorthand for creating a negated expectation This provides a more natural way to write assertions with not
fluent_test
Run all FluentTest tests in a module

Structs§

Reporter

Functions§

auto_initialize_for_tests
config
Creates a new test configuration