plugin.js 874 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. import Plugin from 'ckeditor5-core/src/plugin';
  6. import Editor from 'ckeditor5-core/src/editor/editor';
  7. let editor;
  8. before( () => {
  9. editor = new Editor();
  10. } );
  11. describe( 'constructor()', () => {
  12. it( 'should set the `editor` property', () => {
  13. let plugin = new Plugin( editor );
  14. expect( plugin ).to.have.property( 'editor' ).to.equal( editor );
  15. } );
  16. } );
  17. describe( 'init', () => {
  18. it( 'should exist and do nothing', () => {
  19. let plugin = new Plugin( editor );
  20. expect( plugin.init ).to.be.a( 'function' );
  21. plugin.init();
  22. } );
  23. } );
  24. describe( 'destroy', () => {
  25. it( 'should exist and do nothing', () => {
  26. let plugin = new Plugin( editor );
  27. expect( plugin.destroy ).to.be.a( 'function' );
  28. plugin.destroy();
  29. } );
  30. } );