document.js 687 B

123456789101112131415161718192021222324
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* globals describe, it, expect, bender */
  6. /* bender-tags: document */
  7. 'use strict';
  8. var modules = bender.amd.require( 'document/document', 'document/element' );
  9. describe( 'constructor', function() {
  10. it( 'should create Document with no data', function() {
  11. var Document = modules[ 'document/document' ];
  12. var Element = modules[ 'document/element' ];
  13. var document = new Document();
  14. expect( document ).to.have.property( 'root' ).that.is.instanceof( Element );
  15. expect( document.root ).to.have.property( 'name' ).that.equal( 'root' );
  16. } );
  17. } );