Skip to content

Commit

Permalink
Fix withVoids test
Browse files Browse the repository at this point in the history
There's a slight change in behavior, but we accept it.

Also there was a regression in how slate handles void nodes in 0.63,
but then it was fixed somewhere between 0.63 and 0.66.
See ianstormtaylor/slate#3990
  • Loading branch information
e1himself committed Oct 20, 2021
1 parent 6b1cfa4 commit 44900eb
Showing 1 changed file with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,10 @@ describe('editor-v4 - withVoids', () => {
<h-p>
<h-text>
text before
<cursor />
</h-text>
</h-p>
<h-p>
<h-text>text after</h-text>
<h-text><cursor />text after</h-text>
</h-p>
</editor>
) as unknown) as Editor;
Expand All @@ -131,10 +130,10 @@ describe('editor-v4 - withVoids', () => {
const editor = createEditor(
<editor>
<h-p>
<h-text>text before</h-text>
<h-text>text before 1</h-text>
</h-p>
<h-p>
<h-text>text before</h-text>
<h-text>text before 2</h-text>
</h-p>
<h-divider>
<h-text>
Expand All @@ -155,16 +154,13 @@ describe('editor-v4 - withVoids', () => {
const expected = ((
<editor>
<h-p>
<h-text>text before</h-text>
<h-text>text before 1</h-text>
</h-p>
<h-p>
<h-text>
text before
<cursor />
</h-text>
<h-text>text before 2</h-text>
</h-p>
<h-p>
<h-text>text after</h-text>
<h-text><cursor />text after</h-text>
</h-p>
</editor>
) as unknown) as Editor;
Expand Down Expand Up @@ -206,13 +202,10 @@ describe('editor-v4 - withVoids', () => {
const expected = ((
<editor>
<h-p>
<h-text>
text before
<cursor />
</h-text>
<h-text>text before</h-text>
</h-p>
<h-p>
<h-text>text after</h-text>
<h-text><cursor />text after</h-text>
</h-p>
</editor>
) as unknown) as Editor;
Expand Down

0 comments on commit 44900eb

Please sign in to comment.