diff --git a/src/types/YText.js b/src/types/YText.js index e43717a0..dd5500c2 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -195,6 +195,8 @@ const insertText = (transaction, parent, left, right, currentAttributes, text, a } const minPos = minimizeAttributeChanges(left, right, currentAttributes, attributes) const insertPos = insertAttributes(transaction, parent, minPos.left, minPos.right, currentAttributes, attributes) + left = insertPos.left + right = insertPos.right // insert content if (text.constructor === String) { left = new ItemString(nextID(transaction), left, left === null ? null : left.lastId, right, right === null ? null : right.id, parent, null, text) diff --git a/src/utils/StructStore.js b/src/utils/StructStore.js index 91865b85..d28cece1 100644 --- a/src/utils/StructStore.js +++ b/src/utils/StructStore.js @@ -18,7 +18,7 @@ export class StructStore { /** * Store uncompleted struct readers here * @see tryResumePendingReaders - * @type {Set<{stack:Array,structReaders:Map>,missing:ID}>} + * @type {Set<{stack:Array,structReaders:Map>,missing:ID,structReaderIterator:IterableIterator>,structReaderIteratorResult:IteratorResult>}>} */ this.pendingStructReaders = new Set() /** diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index abb29143..3953a883 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -400,8 +400,17 @@ export const testRepeatGeneratingYarrayTests1800 = tc => { /** * @param {t.TestCase} tc */ -export const testRepeatGeneratingYarrayTests10000 = tc => { - applyRandomTests(tc, arrayTransactions, 10000) +export const testRepeatGeneratingYarrayTests3000 = tc => { + t.skip(!t.production) + applyRandomTests(tc, arrayTransactions, 3000) +} + +/** + * @param {t.TestCase} tc + */ +export const testRepeatGeneratingYarrayTests5000 = tc => { + t.skip(!t.production) + applyRandomTests(tc, arrayTransactions, 5000) } /** diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index 873c43f5..223e1ab4 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -435,10 +435,19 @@ export const testRepeatGeneratingYmapTests1800 = tc => { applyRandomTests(tc, mapTransactions, 1800) } +/** + * @param {t.TestCase} tc + */ +export const testRepeatGeneratingYmapTests5000 = tc => { + t.skip(!t.production) + applyRandomTests(tc, mapTransactions, 5000) +} + /** * @param {t.TestCase} tc */ export const testRepeatGeneratingYmapTests10000 = tc => { + t.skip(!t.production) applyRandomTests(tc, mapTransactions, 10000) }