Skip to main content

Module testing

Module testing 

Source
Expand description

Testing utilities for FastMCP console output.

Provides utilities for testing console output:

§Example

use fastmcp_console::testing::{TestConsole, SnapshotTest};

#[test]
fn test_output() {
    let console = TestConsole::new();
    // ... render to console ...

    // Assert specific content
    console.assert_contains("expected text");

    // Or compare against snapshot
    SnapshotTest::new("test_name").assert_snapshot(&console);
}

Structs§

SnapshotTest
Snapshot testing for rich console output.
TestConsole
A Console that captures output for testing