mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-07-30 12:31:08 +00:00

1. replace unbounded sender with directory call using static runtime 2. sync + send for handler
16 lines
392 B
Rust
16 lines
392 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_system(|| vec![Module::new().event(event, hello)]);
|
|
|
|
let request = DispatchRequest::new(1, event);
|
|
let resp = async_send(request).await.unwrap();
|
|
log::info!("sync resp: {:?}", resp);
|
|
}
|