/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ import Document from '../../src/model/document'; import Element from '../../src/model/element'; import RootElement from '../../src/model/rootelement'; import count from '@ckeditor/ckeditor5-utils/src/count'; describe( 'Element', () => { describe( 'constructor()', () => { it( 'should create root element without attributes', () => { let doc = new Document(); let root = new RootElement( doc ); expect( root ).to.be.an.instanceof( Element ); expect( root ).to.have.property( 'document' ).that.equals( doc ); expect( count( root.getAttributes() ) ).to.equal( 0 ); expect( root.childCount ).to.equal( 0 ); } ); } ); } );