testEditorSession

fun testEditorSession(doc: String = "", cursor: DocPos = DocPos.ZERO, extensions: Extension? = null): EditorSession

Create an EditorSession for testing purposes.

This is the recommended way to create editor sessions in tests. It wraps the common boilerplate of creating an EditorState and EditorSession.

Parameters

doc

The initial document content.

cursor

The initial cursor position.

extensions

Extensions to configure the editor with.