/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ import ContainerElement from '../../src/view/containerelement'; import Element from '../../src/view/element'; import { parse } from '../../src/dev-utils/view'; describe( 'ContainerElement', () => { describe( 'constructor()', () => { it( 'should create element with default priority', () => { const el = new ContainerElement( 'p' ); expect( el ).to.be.an.instanceof( ContainerElement ); expect( el ).to.be.an.instanceof( Element ); expect( el ).to.have.property( 'name' ).that.equals( 'p' ); } ); } ); describe( 'getFillerOffset', () => { it( 'should return position 0 if element is empty', () => { expect( parse( '' ).getFillerOffset() ).to.equals( 0 ); } ); it( 'should return null if element is not empty', () => { expect( parse( 'foo' ).getFillerOffset() ).to.be.null; } ); } ); } );