fc45ff09a3
* Allow change to return value from users closure * Add closure_result field to OptimisticChangeResult
15 lines
506 B
Rust
15 lines
506 B
Rust
use wasm_bindgen_test::*;
|
|
|
|
#[wasm_bindgen_test]
|
|
fn test_simple_frontend_change_with_set_sequence() {
|
|
let mut f = automerge_frontend::Frontend::new_with_timestamper(Box::new(|| None));
|
|
f.change::<_, _, automerge_frontend::InvalidChangeRequest>(None, |doc| {
|
|
doc.add_change(automerge_frontend::LocalChange::set(
|
|
automerge_frontend::Path::root().key(""),
|
|
automerge_frontend::Value::Sequence(vec![]),
|
|
))
|
|
.unwrap();
|
|
Ok(())
|
|
})
|
|
.unwrap();
|
|
}
|