add test case for insertSet

This commit is contained in:
Kevin Jahns
2025-04-08 14:53:36 +02:00
parent 6d05ce3820
commit 632ec45020

View File

@@ -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()
}