amd.js 732 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' ], function( ckeditor ) {
  7. return {
  8. test: ( ckeditor && ( typeof ckeditor == 'object' ) )
  9. };
  10. } );
  11. describe( 'CKEDITOR.require()', function() {
  12. it( 'should work with a defined module', function( done ) {
  13. CKEDITOR.require( [ 'testModule' ], function( testModule ) {
  14. expect( testModule ).to.have.property( 'test' ).to.be.true();
  15. done();
  16. } );
  17. } );
  18. it( 'should work with a core module', function( done ) {
  19. CKEDITOR.require( [ 'utils' ], function( utils ) {
  20. expect( utils ).to.be.an( 'object' );
  21. done();
  22. } );
  23. } );
  24. } );