1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-17 20:51:20 +02:00

add void node removal tests

This commit is contained in:
Ian Storm Taylor
2019-12-13 15:36:07 -05:00
parent cc27ed2564
commit b3333e8d2e
2 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../../..'
export const input = (
<editor>
<block void>
<cursor />
one
</block>
</editor>
)
export const run = editor => {
Editor.removeNodes(editor, { at: [0] })
}
export const output = <editor />

View File

@@ -0,0 +1,29 @@
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../../..'
export const input = (
<editor>
<block void>
<cursor />
one
</block>
<block>two</block>
<block>three</block>
</editor>
)
export const run = editor => {
Editor.removeNodes(editor, { at: [0] })
}
export const output = (
<editor>
<block>
<cursor />
two
</block>
<block>three</block>
</editor>
)