8
0

attributeelement.js 852 B

12345678910111213141516171819202122232425
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* bender-tags: treeview */
  6. 'use strict';
  7. import AttributeElement from '/ckeditor5/engine/treeview/attributeelement.js';
  8. import Element from '/ckeditor5/engine/treeview/element.js';
  9. import { DEFAULT_PRIORITY } from '/ckeditor5/engine/treeview/attributeelement.js';
  10. describe( 'AttributeElement', () => {
  11. describe( 'constructor', () => {
  12. it( 'should create element with default priority', () => {
  13. const el = new AttributeElement( 'strong' );
  14. expect( el ).to.be.an.instanceof( AttributeElement );
  15. expect( el ).to.be.an.instanceof( Element );
  16. expect( el ).to.have.property( 'name' ).that.equals( 'strong' );
  17. expect( el ).to.have.property( 'priority' ).that.equals( DEFAULT_PRIORITY );
  18. } );
  19. } );
  20. } );