|
|
@@ -505,6 +505,12 @@ describe( 'position', () => {
|
|
|
it( 'should return position parent element and it\'s ancestors', () => {
|
|
|
expect( new Position( root, [ 1, 1, 1 ] ).getAncestors() ).to.deep.equal( [ li2, ul, root ] );
|
|
|
} );
|
|
|
+
|
|
|
+ it( 'should return DocumentFragment if position is directly in document fragment', () => {
|
|
|
+ const docFrag = new DocumentFragment();
|
|
|
+
|
|
|
+ expect( new Position( docFrag, [ 0 ] ).getAncestors() ).to.deep.equal( [ docFrag ] );
|
|
|
+ } );
|
|
|
} );
|
|
|
|
|
|
describe( 'getCommonPath', () => {
|