load.js 739 B

12345678910111213141516171819202122232425262728293031
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. const modules = bender.amd.require( 'ckeditor5/path', 'ckeditor5/load' );
  7. let load, path;
  8. before( () => {
  9. path = modules[ 'ckeditor5/path' ];
  10. load = modules[ 'ckeditor5/load' ];
  11. } );
  12. describe( 'load()', () => {
  13. it( 'loads ckeditor.js', () => {
  14. return load( 'ckeditor.js' )
  15. .then( ( CKEDITORModule ) => {
  16. expect( CKEDITORModule.default ).to.have.property( 'create' );
  17. } );
  18. } );
  19. it( 'loads core/editor', () => {
  20. return load( path.getModulePath( 'core/editor' ) )
  21. .then( ( EditorModule ) => {
  22. expect( EditorModule.default ).to.be.a( 'function' );
  23. } );
  24. } );
  25. } );