MCPcopy
hub / github.com/yjs/yjs / testRepeatRandomDiffing2

Function testRepeatRandomDiffing2

tests/IdSet.tests.js:211–223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 * @param {t.TestCase} tc
210 */
211export const testRepeatRandomDiffing2 = tc => {
212 const clients = 4
213 const clockRange = 100
214 const ids1 = createRandomIdSet(tc.prng, clients, clockRange)
215 const ids2 = createRandomIdSet(tc.prng, clients, clockRange)
216 const idsExclude = createRandomIdSet(tc.prng, clients, clockRange)
217 const merged = d.mergeIdSets([ids1, ids2])
218 const mergedExcluded = d.diffIdSet(merged, idsExclude)
219 const e1 = d.diffIdSet(ids1, idsExclude)
220 const e2 = d.diffIdSet(ids2, idsExclude)
221 const excludedMerged = d.mergeIdSets([e1, e2])
222 compareIdSets(mergedExcluded, excludedMerged)
223}
224
225/**
226 * @param {t.TestCase} tc

Callers

nothing calls this directly

Calls 2

createRandomIdSetFunction · 0.90
compareIdSetsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…