[skip allowed struct in yjs] fixed all tests

This commit is contained in:
Kevin Jahns
2025-06-06 17:46:12 +02:00
parent 78fb8d0b0a
commit a76d6e1c0e
2 changed files with 2 additions and 2 deletions

View File

@@ -92,11 +92,11 @@ export const removeRangesFromStructSet = (ss, exclude) => {
for (let i = 0; i < idranges.length; i++) { for (let i = 0; i < idranges.length; i++) {
const range = idranges[i] const range = idranges[i]
let startIndex = 0 let startIndex = 0
let endIndex = structs.length
if (range.clock >= lastStruct.id.clock + lastStruct.length) continue if (range.clock >= lastStruct.id.clock + lastStruct.length) continue
if (range.clock > firstStruct.id.clock) { if (range.clock > firstStruct.id.clock) {
startIndex = findIndexCleanStart(null, structs, range.clock) startIndex = findIndexCleanStart(null, structs, range.clock)
} }
let endIndex = structs.length // must be set here, after structs is modified
if (range.clock + range.len <= firstStruct.id.clock) continue if (range.clock + range.len <= firstStruct.id.clock) continue
if (range.clock + range.len < lastStruct.id.clock + lastStruct.length) { if (range.clock + range.len < lastStruct.id.clock + lastStruct.length) {
endIndex = findIndexCleanStart(null, structs, range.clock + range.len) endIndex = findIndexCleanStart(null, structs, range.clock + range.len)

View File

@@ -604,7 +604,7 @@ const arrayTransactions = [
* @param {t.TestCase} tc * @param {t.TestCase} tc
*/ */
export const testRepeatGeneratingYarrayTests6 = tc => { export const testRepeatGeneratingYarrayTests6 = tc => {
applyRandomTests(tc, arrayTransactions, 6*3) applyRandomTests(tc, arrayTransactions, 6)
} }
/** /**