implement update logging

This commit is contained in:
Kevin Jahns
2020-12-16 21:25:00 +01:00
parent 22aef63d8a
commit 072947c0bb
3 changed files with 27 additions and 0 deletions

View File

@@ -57,7 +57,11 @@ export const testMergeUpdatesWrongOrder = tc => {
])
const targetState = Y.encodeStateAsUpdate(ydoc)
t.info('Target State: ')
Y.logUpdate(targetState)
;[wrongOrder, overlapping, separated].forEach((updates, i) => {
t.info('State $' + i + ':')
Y.logUpdate(updates)
const merged = new Y.Doc()
Y.applyUpdate(merged, updates)
t.compareArrays(merged.getArray().toArray(), array.toArray())