Skip to main content

screenshot

Macro screenshot 

Source
macro_rules! screenshot {
    ($plugin:ty, $path:expr $(,)?) => { ... };
}
Expand description

Construct a ScreenshotTest for the given plugin type, with the reference-PNG path required as the second argument. The path is anchored to the calling crate’s CARGO_MANIFEST_DIR when relative, or used as-is when absolute.

#[test]
fn screenshot() {
    truce_test::screenshot!(Plugin, "screenshots/default.png").run();
}