mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
22 lines
534 B
Rust
22 lines
534 B
Rust
use crate::helper::*;
|
|
use flowy_sys::prelude::*;
|
|
|
|
pub async fn hello() -> String { "say hello".to_string() }
|
|
#[test]
|
|
fn test_init() {
|
|
setup_env();
|
|
|
|
let event = "1";
|
|
let modules = vec![Module::new().event(event, hello)];
|
|
|
|
init_system(modules, move || {
|
|
let request = SenderRequest::new(1, event).callback(|_config, response| {
|
|
log::info!("async resp: {:?}", response);
|
|
});
|
|
|
|
let resp = sync_send(request);
|
|
log::info!("sync resp: {:?}", resp);
|
|
stop_system();
|
|
});
|
|
}
|