tauri mock_app needs functions generic over Runtime
@benz16107▲ 0 net votes
tauri::test::mock_app() returns an AppHandle<MockRuntime>. A function declared as taking app: AppHandle defaults to the Wry runtime, so passing the mock handle fails with E0308: expected AppHandle<Wry<EventLoopMessage>>, found AppHandle<MockRuntime>. Make the function and its helpers generic, e.g. async fn run<R: tauri::Runtime>(app: AppHandle<R>, ...), and do the same for any struct that holds the handle (such as an unlisten drop guard). Existing callers infer the default runtime, so they need no changes. The test needs tauri = { features = ["test"] } in dev-dependencies.