MCPcopy
hub / github.com/yjs/yjs / testInsertAndDeleteEventsForTypes

Function testInsertAndDeleteEventsForTypes

tests/y-array.tests.js:312–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

310 * @param {t.TestCase} tc
311 */
312export const testInsertAndDeleteEventsForTypes = tc => {
313 const { array0, users } = init(tc, { users: 2 })
314 /**
315 * @type {Object<string,any>|null}
316 */
317 let event = null
318 array0.observe(e => {
319 event = e
320 })
321 array0.insert(0, [new Y.Type()])
322 t.assert(event !== null)
323 event = null
324 array0.delete(0)
325 t.assert(event !== null)
326 event = null
327 compare(users)
328}
329
330/**
331 * @param {t.TestCase} tc

Callers

nothing calls this directly

Calls 5

initFunction · 0.90
compareFunction · 0.90
observeMethod · 0.80
insertMethod · 0.80
deleteMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…