lib.rs 478 B

123456789101112131415161718192021222324
  1. pub mod builder;
  2. mod helper;
  3. mod tester;
  4. use crate::helper::root_dir;
  5. use flowy_sdk::{ArcFlowyServer, FlowySDK};
  6. use std::sync::Once;
  7. pub mod prelude {
  8. pub use crate::{
  9. builder::{TestBuilder, *},
  10. helper::*,
  11. };
  12. pub use flowy_dispatch::prelude::*;
  13. }
  14. static INIT: Once = Once::new();
  15. pub fn init_test_sdk(server: ArcFlowyServer) {
  16. let root_dir = root_dir();
  17. INIT.call_once(|| {
  18. FlowySDK::construct_with(&root_dir, server);
  19. });
  20. }