Closed jkcs closed 4 weeks ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Updated (UTC) |
---|---|---|---|
blocknote | ✅ Ready (Inspect) | Visit Preview | Jun 6, 2024 8:40pm |
blocknote-website | ✅ Ready (Inspect) | Visit Preview | Jun 6, 2024 8:40pm |
@jkcs is attempting to deploy a commit to the TypeCell Team on Vercel.
A member of the Team first needs to authorize it.
It seems like there is the same issue here?
Thanks @jkcs. Your solution looks great, I think you've found the right place to fix it.
It seems like there is the same issue here?
Great find! I think you're right. Could you fix this as well and create unit tests for both of them? I can double the bounty for that
@YousefED Currently there seems to be no unit test for BNUpdateBlock
. How can I add it?
@jkcs the updateBlock
function in https://github.com/TypeCellOS/BlockNote/blob/4a197733e46cf2d53b888e0de5db5a82792ae796/packages/core/src/api/blockManipulation/blockManipulation.test.ts indirectly call BNUpdateBlock. You can add the test there!
Can you also confirm that the test wasn't working before your fix, but now is? (to make sure the tests really work)?
@YousefED Thank you for providing more information. I just tried adding tests in blockManipulation.test.ts
and found that the update tests for BlockContainer.ts
are not effective. The output of typeof block.content === "string"
consistently shows the editor.document
. I believe this test does not verify this point correctly. In the view, it should be converted to <br>
.
Can you also confirm that the test wasn't working before your fix, but now is? (to make sure the tests really work)?
I confirmed through snapshots that it was invalid before the fix and okay after the fix.
@YousefED Thank you for providing more information. I just tried adding tests in
blockManipulation.test.ts
and found that the update tests forBlockContainer.ts
are not effective. The output oftypeof block.content === "string"
consistently shows theeditor.document
. I believe this test does not verify this point correctly. In the view, it should be converted to<br>
.
I don't understand what you mean with typeof block.content === "string"
consistently shows the editor.document
, can you explain?
@YousefED Tests have been added and are ready for review
Great!
After that, @matthewlipski can you do a final review and merge if ok?
done
close #742 /claim #742