Skip to content

Commit ac59a92

Browse files
committed
Add test for undoing ordered list without selection
1 parent fd42a50 commit ac59a92

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,18 @@ describe('markdown-toolbbar-element', function() {
401401
assert.equal('apple\n\n1. |\n\npear\nbanana\n', visualValue())
402402
})
403403

404+
it('undo an ordered list without selection', function() {
405+
setVisualValue('apple\n1. |pear\nbanana\n')
406+
clickToolbar('md-ordered-list')
407+
assert.equal('apple\n|pear\nbanana\n', visualValue())
408+
})
409+
410+
it('undo an ordered list without selection and puts cursor at the right position', function() {
411+
setVisualValue('apple\n1. pea|r\nbanana\n')
412+
clickToolbar('md-ordered-list')
413+
assert.equal('apple\npea|r\nbanana\n', visualValue())
414+
})
415+
404416
it('creates ordered list by selecting one line', function() {
405417
setVisualValue('apple\n|pear|\nbanana\n')
406418
clickToolbar('md-ordered-list')

0 commit comments

Comments
 (0)