8
0

imagecaption.js 971 B

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* global window */
  6. import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
  7. import ImageCaption from '../src/imagecaption';
  8. import ImageCaptionEngine from '../src/imagecaption/imagecaptionengine';
  9. describe( 'ImageCaption', () => {
  10. let editor;
  11. beforeEach( () => {
  12. const editorElement = window.document.createElement( 'div' );
  13. window.document.body.appendChild( editorElement );
  14. return ClassicTestEditor.create( editorElement, {
  15. plugins: [ ImageCaption ]
  16. } )
  17. .then( newEditor => {
  18. editor = newEditor;
  19. } );
  20. } );
  21. it( 'should be loaded', () => {
  22. expect( editor.plugins.get( ImageCaption ) ).to.instanceOf( ImageCaption );
  23. } );
  24. it( 'should load ImageCaptionEngine plugin', () => {
  25. expect( editor.plugins.get( ImageCaptionEngine ) ).to.instanceOf( ImageCaptionEngine );
  26. } );
  27. } );