Expose undiff to JS
This commit is contained in:
parent
c9c2b775a8
commit
ee6277c13f
1 changed files with 64 additions and 21 deletions
|
|
@ -56,11 +56,11 @@ fn test_merge_binary() {
|
|||
}
|
||||
|
||||
#[wasm_bindgen_test] // JsValue isn't supported outside of wasm
|
||||
fn test_get_compact_diff() {
|
||||
fn test_diff() {
|
||||
let parent = "hello ";
|
||||
let changed = "world";
|
||||
|
||||
let result = get_compact_diff(parent, &changed.into(), BuiltinTokenizer::Word);
|
||||
let result = diff(parent, &changed.into(), BuiltinTokenizer::Word);
|
||||
|
||||
assert_eq!(result.len(), 2);
|
||||
let first: i64 = result[0].clone().try_into().unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue