rootelement.js 820 B

12345678910111213141516171819202122232425
  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. import Document from 'ckeditor5/engine/model/document.js';
  7. import Element from 'ckeditor5/engine/model/element.js';
  8. import RootElement from 'ckeditor5/engine/model/rootelement.js';
  9. import count from 'ckeditor5/utils/count.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( count( root.getAttributes() ) ).to.equal( 0 );
  18. expect( root.childCount ).to.equal( 0 );
  19. } );
  20. } );
  21. } );