fontsizecommand.js 945 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. import FontSizeCommand from '../../src/fontsize/fontsizecommand';
  6. import FontCommand from '../../src/fontcommand';
  7. import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor';
  8. describe( 'FontSizeCommand', () => {
  9. let editor, command;
  10. beforeEach( () => {
  11. return ModelTestEditor.create()
  12. .then( newEditor => {
  13. editor = newEditor;
  14. command = new FontSizeCommand( editor );
  15. } );
  16. } );
  17. afterEach( () => {
  18. editor.destroy();
  19. } );
  20. it( 'is a FontCommand', () => {
  21. expect( FontSizeCommand.prototype ).to.be.instanceOf( FontCommand );
  22. expect( command ).to.be.instanceOf( FontCommand );
  23. } );
  24. it( 'operates on fontSize attribute', () => {
  25. expect( command ).to.have.property( 'attributeKey', 'fontSize' );
  26. } );
  27. } );