Преглед изворни кода

Tests: using class constructors instead of string names (config.features).

Kamil Piechaczek пре 9 година
родитељ
комит
dc9b568ed8

+ 7 - 1
packages/ckeditor5-undo/tests/manual/undo.js

@@ -6,9 +6,15 @@
 /* globals console:false, document, window */
 
 import ClassicEditor from '/ckeditor5/editor-classic/classic.js';
+import Enter from '/ckeditor5/enter/enter.js';
+import Typing from '/ckeditor5/typing/typing.js';
+import Paragraph from '/ckeditor5/paragraph/paragraph.js';
+import Undo from '/ckeditor5/undo/undo.js';
+import Bold from '/ckeditor5/basic-styles/bold.js';
+import Italic from '/ckeditor5/basic-styles/italic.js';
 
 ClassicEditor.create( document.querySelector( '#editor' ), {
-	features: [ 'enter', 'typing', 'paragraph', 'undo', 'basic-styles/bold', 'basic-styles/italic' ],
+	features: [ Enter, Typing, Paragraph, Undo, Bold, Italic ],
 	toolbar: [ 'bold', 'italic', 'undo', 'redo' ]
 } )
 .then( editor => {

+ 1 - 1
packages/ckeditor5-undo/tests/undo.js

@@ -21,7 +21,7 @@ describe( 'Undo', () => {
 		const editorElement = document.createElement( 'div' );
 
 		return ClassicTestEditor.create( editorElement, {
-				features: [ 'undo' ]
+				features: [ Undo ]
 			} )
 			.then( newEditor => {
 				editor = newEditor;