Skip to main content

assert_snapshot

Macro assert_snapshot 

Source
macro_rules! assert_snapshot {
    ($name:expr, $console:expr) => { ... };
}
Expand description

Convenience macro for snapshot tests.

§Example

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

#[test]
fn test_output() {
    let console = TestConsole::new();
    console.console().print("Hello!");

    assert_snapshot!("hello_output", console);
}