rootelement.js 775 B

1234567891011121314151617181920212223
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import Document from '../../src/model/document';
  6. import Element from '../../src/model/element';
  7. import RootElement from '../../src/model/rootelement';
  8. import count from '@ckeditor/ckeditor5-utils/src/count';
  9. describe( 'Element', () => {
  10. describe( 'constructor()', () => {
  11. it( 'should create root element without attributes', () => {
  12. let doc = new Document();
  13. let root = new RootElement( doc );
  14. expect( root ).to.be.an.instanceof( Element );
  15. expect( root ).to.have.property( 'document' ).that.equals( doc );
  16. expect( count( root.getAttributes() ) ).to.equal( 0 );
  17. expect( root.childCount ).to.equal( 0 );
  18. } );
  19. } );
  20. } );