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:
@@ -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)
|
||||
})
|
||||
})
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -38,5 +38,3 @@ export const input = (
|
||||
)
|
||||
|
||||
export const output = input
|
||||
|
||||
export const skip = true
|
||||
|
@@ -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' })
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user