mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 22:57:12 -04:00
22 lines
485 B
Rust
22 lines
485 B
Rust
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";
|
|
init_dispatch(|| vec![Module::new().event(event, hello)]);
|
|
|
|
let request = DispatchRequest::new(event);
|
|
let _ = EventDispatch::async_send(
|
|
request,
|
|
Some(|resp| {
|
|
Box::pin(async move {
|
|
dbg!(&resp);
|
|
})
|
|
}),
|
|
)
|
|
.await;
|
|
}
|