highlight.js 981 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. /* global document */
  6. import Highlight from './../src/highlight';
  7. import HighlightEditing from './../src/highlightediting';
  8. import HighlightUI from './../src/highlightui';
  9. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  10. describe( 'Highlight', () => {
  11. let editor, element;
  12. beforeEach( () => {
  13. element = document.createElement( 'div' );
  14. document.body.appendChild( element );
  15. return ClassicTestEditor
  16. .create( element, {
  17. plugins: [ Highlight ]
  18. } )
  19. .then( newEditor => {
  20. editor = newEditor;
  21. } );
  22. } );
  23. afterEach( () => {
  24. element.remove();
  25. return editor.destroy();
  26. } );
  27. it( 'requires HighlightEditing and HighlightUI', () => {
  28. expect( Highlight.requires ).to.deep.equal( [ HighlightEditing, HighlightUI ] );
  29. } );
  30. } );