8
0
Pārlūkot izejas kodu

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

fredck 10 gadi atpakaļ
vecāks
revīzija
7772728b7a
1 mainītis faili ar 14 papildinājumiem un 0 dzēšanām
  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() {