rootelement.js 782 B

1234567891011121314151617181920212223242526
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* bender-tags: model */
  6. 'use strict';
  7. import Document from '/ckeditor5/engine/model/document.js';
  8. import Element from '/ckeditor5/engine/model/element.js';
  9. import RootElement from '/ckeditor5/engine/model/rootelement.js';
  10. describe( 'Element', () => {
  11. describe( 'constructor', () => {
  12. it( 'should create root element without attributes', () => {
  13. let doc = new Document();
  14. let root = new RootElement( doc );
  15. expect( root ).to.be.an.instanceof( Element );
  16. expect( root ).to.have.property( 'document' ).that.equals( doc );
  17. expect( root._attrs.size ).to.equal( 0 );
  18. expect( root.getChildCount() ).to.equal( 0 );
  19. } );
  20. } );
  21. } );