mock websocket

This commit is contained in:
appflowy
2021-12-10 22:18:44 +08:00
parent 34441ee076
commit aeb448c4de
11 changed files with 175 additions and 56 deletions

View File

@ -1,4 +1,3 @@
use flowy_document_infra::core::{Document, FlowyDoc};
use flowy_test::editor::{EditorScript::*, *};
use lib_ot::{revision::RevState, rich_text::RichTextDeltaBuilder};
@ -51,16 +50,3 @@ async fn doc_push_test() {
];
EditorTest::new().await.run_scripts(scripts).await;
}
#[tokio::test]
async fn doc_push_test2() {
let mut document = Document::new::<FlowyDoc>();
let delta_1 = document.insert(0, "123").unwrap();
let json = document.to_json();
let scripts = vec![
SimulatePushRevisionMessageWithDelta(delta_1),
AssertJson(r#"[{"insert":"\n123"}]"#),
];
EditorTest::new().await.run_scripts(scripts).await;
}