Skip to main content

post_notification

Function post_notification 

Source
pub(super) fn post_notification<R: Runtime>(
    app: &AppHandle<R>,
    title: &str,
    body: String,
)
Expand description

Post a desktop notification. Split on cfg(test) so the OS-posting body is compiled out of the test/coverage build: the scheduler’s delivery tests drive the routing glue end to end, and without this a real tauri_plugin_notification would post an actual macOS notification on every cargo test run — attributed to the terminal, since a test binary is not an app bundle. The routing the tests assert runs before this call, so no meaningful coverage is lost.