rootelement.js 842 B

123456789101112131415161718192021222324252627
  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. import count from '/ckeditor5/utils/count.js';
  11. describe( 'Element', () => {
  12. describe( 'constructor', () => {
  13. it( 'should create root element without attributes', () => {
  14. let doc = new Document();
  15. let root = new RootElement( doc );
  16. expect( root ).to.be.an.instanceof( Element );
  17. expect( root ).to.have.property( 'document' ).that.equals( doc );
  18. expect( count( root.getAttributes() ) ).to.equal( 0 );
  19. expect( root.getChildCount() ).to.equal( 0 );
  20. } );
  21. } );
  22. } );