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

Tests: Added an Editor class test to check the support of config.contentLanguage.

Aleksander Nowodzinski пре 6 година
родитељ
комит
bf642e8343
1 измењених фајлова са 8 додато и 0 уклоњено
  1. 8 0
      packages/ckeditor5-core/tests/editor/editor.js

+ 8 - 0
packages/ckeditor5-core/tests/editor/editor.js

@@ -197,6 +197,14 @@ describe( 'Editor', () => {
 			const editor = new TestEditor( { language: 'pl' } );
 			const editor = new TestEditor( { language: 'pl' } );
 
 
 			expect( editor.locale.language ).to.equal( 'pl' );
 			expect( editor.locale.language ).to.equal( 'pl' );
+			expect( editor.locale.contentLanguage ).to.equal( 'pl' );
+		} );
+
+		it( 'is configured with the config.contentLanguage', () => {
+			const editor = new TestEditor( { language: 'pl', contentLanguage: 'ar' } );
+
+			expect( editor.locale.language ).to.equal( 'pl' );
+			expect( editor.locale.contentLanguage ).to.equal( 'ar' );
 		} );
 		} );
 	} );
 	} );