imagecaption.js 980 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Copyright (c) 2003-2018, 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
  15. .create( editorElement, {
  16. plugins: [ ImageCaption ]
  17. } )
  18. .then( newEditor => {
  19. editor = newEditor;
  20. } );
  21. } );
  22. it( 'should be loaded', () => {
  23. expect( editor.plugins.get( ImageCaption ) ).to.instanceOf( ImageCaption );
  24. } );
  25. it( 'should load ImageCaptionEngine plugin', () => {
  26. expect( editor.plugins.get( ImageCaptionEngine ) ).to.instanceOf( ImageCaptionEngine );
  27. } );
  28. } );