|
|
@@ -13,4 +13,34 @@
|
|
|
|
|
|
// Wait for the "ckeditor" module to be ready to start testing.
|
|
|
CKEDITOR.require( [ 'ckeditor' ], done );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * AMD tools related to CKEditor.
|
|
|
+ */
|
|
|
+ bender.amd = {
|
|
|
+ /**
|
|
|
+ * Gets and object which holds the CKEditor modules guaranteed to be loaded before tests start.
|
|
|
+ *
|
|
|
+ * @params {...String} module The name of the module to load.
|
|
|
+ * @returns {Object} The object that will hold the loaded modules.
|
|
|
+ */
|
|
|
+ require: function() {
|
|
|
+ var modules = {};
|
|
|
+
|
|
|
+ var done = bender.defer();
|
|
|
+
|
|
|
+ var names = [].slice.call( arguments );
|
|
|
+
|
|
|
+ CKEDITOR.require( names, function() {
|
|
|
+ for ( var i = 0; i < names.length; i++ ) {
|
|
|
+ modules[ names[ i ] ] = arguments[ i ] ;
|
|
|
+ }
|
|
|
+
|
|
|
+ // Finally give green light for tests to start.
|
|
|
+ done();
|
|
|
+ } );
|
|
|
+
|
|
|
+ return modules;
|
|
|
+ }
|
|
|
+ };
|
|
|
} )();
|