Move content and list iteration abstraction

This commit is contained in:
Kevin Jahns
2021-11-08 18:15:58 +01:00
parent 294ba351b6
commit 53a7b286b8
7 changed files with 207 additions and 18 deletions

View File

@@ -12,6 +12,7 @@ import {
readContentFormat,
readContentAny,
readContentDoc,
readContentMove,
Doc,
PermanentUserData,
encodeStateAsUpdate,
@@ -24,7 +25,8 @@ import * as Y from '../src/index.js'
* @param {t.TestCase} tc
*/
export const testStructReferences = tc => {
t.assert(contentRefs.length === 11)
t.assert(contentRefs.length === 12)
// contentRefs[0] is reserved for GC
t.assert(contentRefs[1] === readContentDeleted)
t.assert(contentRefs[2] === readContentJSON) // TODO: deprecate content json?
t.assert(contentRefs[3] === readContentBinary)
@@ -35,6 +37,7 @@ export const testStructReferences = tc => {
t.assert(contentRefs[8] === readContentAny)
t.assert(contentRefs[9] === readContentDoc)
// contentRefs[10] is reserved for Skip structs
t.assert(contentRefs[11] === readContentMove)
}
/**