1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-18 09:35:20 +02:00
joplin/packages/editor/CodeMirror/editorCommands/insertLineAfter.test.ts

21 lines
515 B
TypeScript
Raw Normal View History

import { EditorSelection } from '@codemirror/state';
import createTestEditor from '../testUtil/createTestEditor';
import insertLineAfter from './insertLineAfter';
describe('insertLineAfter', () => {
test('should continue lists', async () => {
const editor = await createTestEditor(
'- This\n- is\n- a test',
EditorSelection.cursor(1),
['BulletList'],
);
insertLineAfter(editor);
expect(editor.state.doc.toString()).toBe([
'- This',
'- ',
'- is',
'- a test',
].join('\n'));
});
});