import Delta from 'quill-delta';
import Editor from '../../../core/editor';
describe('Indent', function() {
it('+1', function() {
const editor = this.initialize(
Editor,
'
- 0123
',
);
editor.formatText(4, 1, { indent: '+1' });
expect(editor.getDelta()).toEqual(
new Delta().insert('0123').insert('\n', { list: 'bullet', indent: 1 }),
);
expect(editor.scroll.domNode).toEqualHTML(
'- 0123
',
);
});
it('-1', function() {
const editor = this.initialize(
Editor,
'- 0123
',
);
editor.formatText(4, 1, { indent: '-1' });
expect(editor.getDelta()).toEqual(
new Delta().insert('0123').insert('\n', { list: 'bullet' }),
);
expect(editor.scroll.domNode).toEqualHTML(
'- 0123
',
);
});
});