add some tests

This commit is contained in:
Philipp Kühn
2019-12-08 00:16:44 +01:00
parent d8fe4ee3f8
commit 90f86bafbb
12 changed files with 524 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
import { Editor } from '../Editor'
declare module "../Editor" {
interface Editor {
insertText(text: string): Editor,
}
}
export default function insertText(next: Function, { state, view }: Editor, text: string): void {
view.dispatch(state.tr.insertText(text))
next()
}