8
0

position.js 683 B

123456789101112131415161718192021222324252627282930
  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. const modules = bender.amd.require(
  8. 'core/treeview/position'
  9. );
  10. describe( 'Position', () => {
  11. let Position;
  12. before( () => {
  13. Position = modules[ 'core/treeview/position' ];
  14. } );
  15. describe( 'constructor', () => {
  16. it( 'should create element without attributes', () => {
  17. const parentMock = {};
  18. const elem = new Position( parentMock, 5 );
  19. expect( elem ).to.have.property( 'parent' ).that.equals( parentMock );
  20. expect( elem ).to.have.property( 'offset' ).that.equals( 5 );
  21. } );
  22. } );
  23. } );