8
0

rootelement.js 957 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* jshint expr: true */
  6. /* bender-tags: document */
  7. 'use strict';
  8. const modules = bender.amd.require(
  9. 'document/document',
  10. 'document/element',
  11. 'document/rootelement'
  12. );
  13. describe( 'Element', function() {
  14. var Document, Element, RootElement;
  15. before( function() {
  16. Document = modules[ 'document/document' ];
  17. Element = modules[ 'document/element' ];
  18. RootElement = modules[ 'document/rootelement' ];
  19. } );
  20. describe( 'constructor', function() {
  21. it( 'should create root element without attributes', function() {
  22. var doc = new Document();
  23. var root = new RootElement( doc );
  24. expect( root ).to.be.an.instanceof( Element );
  25. expect( root ).to.have.property( 'document' ).that.equals( doc );
  26. expect( root._getAttrCount() ).to.equal( 0 );
  27. expect( root.getChildCount() ).to.equal( 0 );
  28. } );
  29. } );
  30. } );