From 632ec4502068ccd270203f0552159fff3f9dd5ba Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 8 Apr 2025 14:53:36 +0200 Subject: [PATCH] add test case for insertSet --- tests/testHelper.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testHelper.js b/tests/testHelper.js index 56983679..c5043223 100644 --- a/tests/testHelper.js +++ b/tests/testHelper.js @@ -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() }