position.js 589 B

12345678910111213141516171819202122
  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 Position from '/ckeditor5/core/treeview/position.js';
  8. describe( 'Position', () => {
  9. describe( 'constructor', () => {
  10. it( 'should create element without attributes', () => {
  11. const parentMock = {};
  12. const elem = new Position( parentMock, 5 );
  13. expect( elem ).to.have.property( 'parent' ).that.equals( parentMock );
  14. expect( elem ).to.have.property( 'offset' ).that.equals( 5 );
  15. } );
  16. } );
  17. } );