1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-31 19:01:54 +02:00

fix tests missing selection, unskip some tests

This commit is contained in:
Ian Storm Taylor
2019-12-13 12:53:58 -05:00
parent d8b915a406
commit bb6a4d9ce8
15 changed files with 23 additions and 25 deletions

View File

@@ -10,6 +10,7 @@ describe('slate-history', () => {
run(editor)
editor.exec({ type: 'undo' })
assert.deepEqual(editor.children, output.children)
assert.deepEqual(editor.selection, output.selection)
})
})

View File

@@ -4,7 +4,7 @@ import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.delete()
Editor.delete(editor)
}
export const input = (
@@ -18,5 +18,3 @@ export const input = (
)
export const output = input
export const skip = true

View File

@@ -4,7 +4,7 @@ import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.delete()
Editor.delete(editor)
}
export const input = (
@@ -21,5 +21,3 @@ export const input = (
)
export const output = input
export const skip = true

View File

@@ -4,7 +4,7 @@ import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.delete()
Editor.delete(editor)
}
export const input = (
@@ -29,5 +29,3 @@ export const input = (
)
export const output = input
export const skip = true

View File

@@ -38,5 +38,3 @@ export const input = (
)
export const output = input
export const skip = true

View File

@@ -1,12 +1,13 @@
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.exec({ type: 'insert_text', text: 't' })
// editor.move({ reverse: true })
Editor.move(editor, { reverse: true })
editor.exec({ type: 'insert_text', text: 'w' })
// editor.move({ reverse: true })
Editor.move(editor, { reverse: true })
editor.exec({ type: 'insert_text', text: 'o' })
}