Skip to main content

for_test_params

Function for_test_params 

Source
pub fn for_test_params(params: Arc<dyn Params>) -> PluginContext
Expand description

Re-export of truce_core::editor::for_test_params for plugin authors who want to drive snapshot tests directly without the assert_screenshot! macro. Build a PluginContext backed only by params. All write closures are no-ops; reads delegate to the params Arc; the transport reports the deterministic crate::events::TransportInfo::for_screenshot state so screenshot tests stay reproducible across CI runs.

Used by editor backends inside their Editor::screenshot() impl, and re-exported from truce-test for plugin authors that want to drive snapshot tests directly.