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

Improved test descriptions.

Maciej Bukowski пре 6 година
родитељ
комит
6ebcc9ceea

+ 2 - 2
packages/ckeditor5-core/tests/_utils-tests/classictesteditor.js

@@ -177,7 +177,7 @@ describe( 'ClassicTestEditor', () => {
 				} );
 		} );
 
-		it( 'initializes the data with `config.initialData` if this option is provided', () => {
+		it( 'initializes the data controller with `config.initialData` if this option is provided', () => {
 			return ClassicTestEditor.create( editorElement, { initialData: '<p>foo</p>', plugins: [ Paragraph ] } )
 				.then( editor => {
 					expect( editor.getData() ).to.equal( '<p>foo</p>' );
@@ -186,7 +186,7 @@ describe( 'ClassicTestEditor', () => {
 				} );
 		} );
 
-		it( 'initializes the data with an empty string if the `config.initialData` is not provided', () => {
+		it( 'initializes the data controller with an empty string if the `config.initialData` is not provided', () => {
 			return ClassicTestEditor.create( editorElement )
 				.then( editor => {
 					expect( editor.getData() ).to.equal( '' );

+ 4 - 2
packages/ckeditor5-core/tests/_utils-tests/virtualtesteditor.js

@@ -34,15 +34,17 @@ describe( 'VirtualTestEditor', () => {
 		it( 'mixes DataApiMixin', () => {
 			expect( testUtils.isMixed( VirtualTestEditor, DataApiMixin ) ).to.true;
 		} );
+	} );
 
-		it( 'supports `config.initialData`', () => {
+	describe( 'static create()', () => {
+		it( 'initializes the data controller with the `config.initialData`', () => {
 			return VirtualTestEditor.create( { initialData: '<p>foo</p>', plugins: [ Paragraph ] } )
 				.then( editor => {
 					expect( editor.getData() ).to.equal( '<p>foo</p>' );
 				} );
 		} );
 
-		it( 'initializes an empty editor if the `config.initialData` is not provided', () => {
+		it( 'initializes the data controller with an empty string if the `config.initialData` is not provided', () => {
 			return VirtualTestEditor.create()
 				.then( editor => {
 					expect( editor.getData() ).to.equal( '' );