amd.js 702 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. 'use strict';
  6. CKEDITOR.define( 'testModule', [ 'ckeditor' ], ( ckeditor ) => {
  7. return {
  8. test: ( ckeditor && ( typeof ckeditor == 'object' ) )
  9. };
  10. } );
  11. describe( 'CKEDITOR.require()', () => {
  12. it( 'should work with a defined module', ( done ) => {
  13. CKEDITOR.require( [ 'testModule' ], ( testModule ) => {
  14. expect( testModule ).to.have.property( 'test' ).to.be.true();
  15. done();
  16. } );
  17. } );
  18. it( 'should work with a core module', ( done ) => {
  19. CKEDITOR.require( [ 'utils' ], ( utils ) => {
  20. expect( utils ).to.be.an( 'object' );
  21. done();
  22. } );
  23. } );
  24. } );