specialcharactersediting.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2019, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  4. */
  5. import SpecialCharactersEditing from '../src/specialcharactersediting';
  6. import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
  7. import VirtualTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/virtualtesteditor';
  8. import InsertSpecialCharacterCommand from '../src/insertspecialcharactercommand';
  9. describe( 'SpecialCharactersEditing', () => {
  10. let editor;
  11. beforeEach( () => {
  12. return VirtualTestEditor
  13. .create( {
  14. plugins: [ SpecialCharactersEditing, Paragraph ]
  15. } )
  16. .then( newEditor => {
  17. editor = newEditor;
  18. } );
  19. } );
  20. afterEach( () => {
  21. return editor.destroy();
  22. } );
  23. it( 'should have proper pluginName', () => {
  24. expect( SpecialCharactersEditing.pluginName ).to.equal( 'SpecialCharactersEditing' );
  25. } );
  26. it( 'adds a command', () => {
  27. expect( editor.commands.get( 'specialCharacters' ) ).to.be.instanceOf( InsertSpecialCharacterCommand );
  28. } );
  29. } );