module.rs 373 B

123456789101112131415
  1. use crate::helper::*;
  2. use flowy_sys::prelude::*;
  3. pub async fn hello() -> String { "say hello".to_string() }
  4. #[tokio::test]
  5. async fn test_init() {
  6. setup_env();
  7. let event = "1";
  8. init_dispatch(|| vec![Module::new().event(event, hello)]);
  9. let request = DispatchRequest::new(event, Payload::None);
  10. let resp = async_send(request).await;
  11. dbg!(&resp);
  12. }