diff --git a/packages/ckeditor5-typing/tests/utils/getlasttextline.js b/packages/ckeditor5-typing/tests/utils/getlasttextline.js index 1ac90133e1c..d5c19a7af1d 100644 --- a/packages/ckeditor5-typing/tests/utils/getlasttextline.js +++ b/packages/ckeditor5-typing/tests/utils/getlasttextline.js @@ -76,6 +76,16 @@ describe( 'utils', () => { [ 0, 0 ], [ 0, 9 ] ); } ); + + it( 'should return empty string if the range is `on` the element', () => { + setModelData( model, 'foobarbaz[]' ); + + testOutput( + model.createRangeOn( root.getChild( 0 ) ), + '', + [ 1 ], + [ 1 ] ); + } ); } ); function testOutput( range1, expectedText, startPath, endPath ) {