Parcourir la source

Added missing test for the dumb Plugin.init().

fredck il y a 10 ans
Parent
commit
7772728b7a
1 fichiers modifiés avec 14 ajouts et 0 suppressions
  1. 14 0
      packages/ckeditor5-engine/tests/editor/editor.js

+ 14 - 0
packages/ckeditor5-engine/tests/editor/editor.js

@@ -47,6 +47,10 @@ CKEDITOR.define( 'plugin!D', [ 'plugin', 'plugin!C' ], function() {
 	} );
 } );
 
+CKEDITOR.define( 'plugin!E', [ 'plugin' ], function( Plugin ) {
+	return Plugin.extend( {} );
+} );
+
 ///////////////////
 
 describe( 'constructor', function() {
@@ -114,6 +118,16 @@ describe( 'init', function() {
 			);
 		} );
 	} );
+
+	it( 'should not fail if loading a plugin that doesn\'t define init()', function() {
+		var Editor = modules.editor;
+
+		editor = new Editor( element, {
+			plugins: 'E'
+		} );
+
+		return editor.init();
+	} );
 } );
 
 describe( 'plugins', function() {