tauri_sys::mocks

Function mock_ipc

source
pub fn mock_ipc<H, R, E>(handler: H)
where H: FnMut(String, JsValue) -> Result<R, E> + 'static, R: Into<JsValue>, E: Into<JsValue>,
Expand description

Intercepts all IPC requests with the given mock handler.

This function can be used when testing tauri frontend applications or when running the frontend in a Node.js context during static site generation.