AppFlowy/rust-lib/flowy-sys/tests/api/module.rs

16 lines
358 B
Rust
Raw Normal View History

use crate::helper::*;
use flowy_sys::prelude::*;
pub async fn hello() -> String { "say hello".to_string() }
#[tokio::test]
async fn test_init() {
setup_env();
let event = "1";
2021-07-03 06:14:10 +00:00
init_dispatch(|| vec![Module::new().event(event, hello)]);
2021-07-06 06:14:47 +00:00
let request = DispatchRequest::new(event);
2021-07-03 06:14:10 +00:00
let resp = async_send(request).await;
dbg!(&resp);
}