image.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 'ckeditor5-core/tests/_utils/classictesteditor';
  7. import Image from 'ckeditor5-image/src/image';
  8. import ImageEngine from 'ckeditor5-image/src/imageengine';
  9. import Widget from 'ckeditor5-image/src/widget/widget';
  10. describe( 'Image', () => {
  11. let editor;
  12. beforeEach( () => {
  13. const editorElement = window.document.createElement( 'div' );
  14. window.document.body.appendChild( editorElement );
  15. return ClassicTestEditor.create( editorElement, {
  16. plugins: [ Image ]
  17. } )
  18. .then( newEditor => {
  19. editor = newEditor;
  20. } );
  21. } );
  22. it( 'should be loaded', () => {
  23. expect( editor.plugins.get( Image ) ).to.instanceOf( Image );
  24. } );
  25. it( 'should load ImageEngine feature', () => {
  26. expect( editor.plugins.get( ImageEngine ) ).to.instanceOf( ImageEngine );
  27. } );
  28. it( 'should load Widget feature', () => {
  29. expect( editor.plugins.get( Widget ) ).to.instanceOf( Widget );
  30. } );
  31. } );