MCPcopy
hub / github.com/yjs/yjs / testArrayFrom

Function testArrayFrom

tests/y-array.tests.js:63–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61 * @param {t.TestCase} _tc
62 */
63export const testArrayFrom = _tc => {
64 const doc1 = new Y.Doc()
65 const db1 = doc1.get('root')
66 const nestedArray1 = Y.Type.from(delta.create().insert([0, 1, 2]))
67 db1.setAttr('array', nestedArray1)
68 t.compare(nestedArray1.toArray(), [0, 1, 2])
69}
70
71/**
72 * Debugging yjs#297 - a critical bug connected to the search-marker approach

Callers

nothing calls this directly

Calls 5

getMethod · 0.95
fromMethod · 0.80
insertMethod · 0.80
setAttrMethod · 0.80
toArrayMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…