8
0

rootelement.js 824 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/src/model/document';
  7. import Element from 'ckeditor5-engine/src/model/element';
  8. import RootElement from 'ckeditor5-engine/src/model/rootelement';
  9. import count from 'ckeditor5-utils/src/count';
  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. } );