basecreator.js 841 B

123456789101112131415161718192021222324252627282930313233343536
  1. /**
  2. * @license Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* bender-tags: creator */
  6. 'use strict';
  7. import testUtils from '/tests/ckeditor5/_utils/utils.js';
  8. import BaseCreator from '/ckeditor5/creator/basecreator.js';
  9. import Plugin from '/ckeditor5/plugin.js';
  10. import Editor from '/ckeditor5/editor.js';
  11. testUtils.createSinonSandbox();
  12. describe( 'BaseCreator', () => {
  13. let creator, editor;
  14. beforeEach( () => {
  15. editor = new Editor();
  16. creator = new BaseCreator( editor );
  17. } );
  18. describe( 'constructor', () => {
  19. it( 'inherits from the Plugin', () => {
  20. expect( creator ).to.be.instanceof( Plugin );
  21. } );
  22. } );
  23. describe( 'create', () => {
  24. it( 'returns a promise', () => {
  25. expect( creator.create() ).to.be.instanceof( Promise );
  26. } );
  27. } );
  28. } );