Selaa lähdekoodia

Introduced CKEDITOR.config and Editor.config.

fredck 10 vuotta sitten
vanhempi
commit
79bf7cd1a1
1 muutettua tiedostoa jossa 18 lisäystä ja 1 poistoa
  1. 18 1
      packages/ckeditor5-utils/tests/ckeditor/ckeditor.js

+ 18 - 1
packages/ckeditor5-utils/tests/ckeditor/ckeditor.js

@@ -7,7 +7,7 @@
 
 'use strict';
 
-var modules = bender.amd.require( 'ckeditor', 'editor', 'promise' );
+var modules = bender.amd.require( 'ckeditor', 'editor', 'promise', 'config' );
 
 var content = document.getElementById( 'content' );
 
@@ -48,6 +48,14 @@ describe( 'create', function() {
 		} );
 	} );
 
+	it( 'should set configurations on the new editor', function() {
+		var CKEDITOR = modules.ckeditor;
+
+		return CKEDITOR.create( content, { test: 1 } ).then( function( editor ) {
+			expect( editor.config.test ).to.equals( 1 );
+		} );
+	} );
+
 	it( 'should add the editor to the `instances` collection', function() {
 		var CKEDITOR = modules.ckeditor;
 
@@ -95,3 +103,12 @@ describe( 'create', function() {
 		} );
 	} );
 } );
+
+describe( 'config', function() {
+	it( 'should be an instance of Config', function() {
+		var CKEDITOR = modules.ckeditor;
+		var Config = modules.config;
+
+		expect( CKEDITOR.config ).to.be.an.instanceof( Config );
+	} );
+} );