1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 11:42:53 +02:00

Convert Slate tests to TypeScript (#3784)

* changed to tsx

* slate tests

* finished making typescript tests

* linting

* linting

* reverted slate-hyperscript files to jsx and changed edlint config

* removed extra file

* Update package.json

* Update package.json

* deleted { file

* changed to tsx

* slate tests

* finished making typescript tests

* linting

* linting

* reverted slate-hyperscript files to jsx and changed edlint config

* removed extra file

* Update package.json

* Update package.json

* deleted { file

* rebase

* removed ~ files

* changed yarn
This commit is contained in:
Maria Jaramillo
2020-07-14 12:47:47 -05:00
committed by GitHub
parent 97dbab13a8
commit 93fe251517
890 changed files with 43 additions and 3230 deletions

View File

@@ -1,11 +1,9 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.deleteBackward()
}
export const input = (
<editor>
<block>Hello</block>
@@ -15,7 +13,6 @@ export const input = (
</block>
</editor>
)
export const output = (
<editor>
<block>Hello</block>

View File

@@ -1,11 +1,9 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.deleteBackward()
}
export const input = (
<editor>
<block>Hello</block>
@@ -17,7 +15,6 @@ export const input = (
</block>
</editor>
)
export const output = (
<editor>
<block>Hello</block>

View File

@@ -1,12 +1,10 @@
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../..'
export const run = editor => {
Transforms.delete(editor)
}
export const input = (
<editor>
<block>
@@ -16,5 +14,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,12 +1,10 @@
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../..'
export const run = editor => {
Transforms.delete(editor)
}
export const input = (
<editor>
<block a>
@@ -19,5 +17,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,12 +1,10 @@
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../..'
export const run = editor => {
Transforms.delete(editor)
}
export const input = (
<editor>
<block>
@@ -27,5 +25,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,12 +1,10 @@
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../..'
export const run = editor => {
editor.insertBreak()
}
export const input = (
<editor>
<block>
@@ -18,5 +16,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,5 +1,4 @@
/** @jsx jsx */
import { jsx } from '../..'
const fragment = (
@@ -20,11 +19,9 @@ const fragment = (
</block>
</block>
)
export const run = editor => {
editor.insertFragment(fragment)
}
export const input = (
<editor>
<block type="d">
@@ -36,7 +33,5 @@ export const input = (
</block>
</editor>
)
export const output = input
export const skip = true

View File

@@ -1,11 +1,9 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
editor.insertText('text')
}
export const input = (
<editor>
<block>
@@ -14,5 +12,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,5 +1,4 @@
/** @jsx jsx */
import { jsx } from '../..'
export const run = editor => {
@@ -7,7 +6,6 @@ export const run = editor => {
editor.insertText('w')
editor.insertText('o')
}
export const input = (
<editor>
<block>
@@ -16,5 +14,4 @@ export const input = (
</block>
</editor>
)
export const output = input

View File

@@ -1,5 +1,4 @@
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../..'
@@ -10,7 +9,6 @@ export const run = editor => {
Transforms.move(editor, { reverse: true })
editor.insertText('o')
}
export const input = (
<editor>
<block>
@@ -19,7 +17,6 @@ export const input = (
</block>
</editor>
)
export const output = (
<editor>
<block>
@@ -28,5 +25,4 @@ export const output = (
</block>
</editor>
)
export const skip = true