2021-07-17 08:24:17 +08:00
|
|
|
pub mod builder;
|
2021-07-16 23:18:12 +08:00
|
|
|
mod helper;
|
|
|
|
mod tester;
|
|
|
|
|
|
|
|
use crate::helper::root_dir;
|
2021-07-17 10:26:05 +08:00
|
|
|
use flowy_sdk::{ArcFlowyServer, FlowySDK};
|
2021-07-17 08:24:17 +08:00
|
|
|
use std::sync::Once;
|
2021-07-06 14:14:47 +08:00
|
|
|
|
|
|
|
pub mod prelude {
|
2021-07-17 08:24:17 +08:00
|
|
|
pub use crate::{
|
|
|
|
builder::{TestBuilder, *},
|
|
|
|
helper::*,
|
|
|
|
};
|
2021-07-08 21:23:44 +08:00
|
|
|
pub use flowy_dispatch::prelude::*;
|
2021-07-06 14:14:47 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static INIT: Once = Once::new();
|
2021-07-17 10:26:05 +08:00
|
|
|
pub fn init_test_sdk(server: ArcFlowyServer) {
|
2021-07-06 14:14:47 +08:00
|
|
|
let root_dir = root_dir();
|
|
|
|
|
|
|
|
INIT.call_once(|| {
|
2021-07-17 10:26:05 +08:00
|
|
|
FlowySDK::construct_with(&root_dir, server);
|
2021-07-06 14:14:47 +08:00
|
|
|
});
|
|
|
|
}
|