mirror of
https://github.com/yjs/yjs.git
synced 2026-02-23 19:49:59 +01:00
add test case for insertSet
This commit is contained in:
@@ -92,6 +92,11 @@ export class TestYInstance extends Y.Doc {
|
||||
}
|
||||
this.updates.push(update)
|
||||
})
|
||||
this.on('afterTransaction', tr => {
|
||||
if (Array.from(tr.insertSet.clients.values()).some(ids => ids.length !== 1)) {
|
||||
throw new Error('Currently, we expect that idset contains exactly one item per client.')
|
||||
}
|
||||
})
|
||||
this.connect()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user