yjs / y-prosemirror

ProseMirror editor binding for Yjs

Home Page:https://demos.yjs.dev/prosemirror/prosemirror.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tests occassionally fail

YousefED opened this issue · comments

While working on a different issue, I noticed the tests of y-prosemirror occasionally fail, possibly indicating a bug.

To reproduce, simply run the tests multiple times, or change the testRepeatGenerateProsemirrorChanges300 to run 10 times:

export const testRepeatGenerateProsemirrorChanges300 = tc => {
  for (let i = 0; i < 10; i++) {
    checkResult(applyRandomTests(tc, pmChanges, 300, createNewProsemirrorView))
  }
}

The error I get:

[3/3] prosemirror: repeat generate prosemirror changes300
  X Objects have a different number of attributes obj["content"][3]["content"][0]["content"][0]["content"][0]["content"][0]["content"][15]["content"][4]["content"][2]["content"][7]["content"][2]

Same issue here.

I've found a certain way to reproduce the failed test, the yDoc is same, but the prosemirror doc is different.

It was a formatting issue already resolved by yjs/yjs@186f714#diff-c299d1b6aeba1b81704fa26fd317da05091111fc72ac264c0772d2563ed9f6f8 and yjs/yjs@ee7c189#diff-c299d1b6aeba1b81704fa26fd317da05091111fc72ac264c0772d2563ed9f6f8.

The yjs@13.4.3 is locked in package-lock.json with those issues.


2021.08.04 Update: This is also fixed by yjs/yjs@4707fc4.