8
0
Эх сурвалжийг харах

Add tests for view/Element.getNormalizedStyle().

Maciej Gołaszewski 6 жил өмнө
parent
commit
015475e5c2

+ 12 - 0
packages/ckeditor5-engine/tests/view/element.js

@@ -833,6 +833,18 @@ describe( 'Element', () => {
 			} );
 		} );
 
+		describe( 'getNormalizedStyle', () => {
+			it( 'should get normalized style', () => {
+				el._setStyle( {
+					color: 'red',
+					'margin-top': '1px'
+				} );
+
+				expect( el.getNormalizedStyle( 'color' ) ).to.equal( 'red' );
+				expect( el.getNormalizedStyle( 'margin-top' ) ).to.equal( '1px' );
+			} );
+		} );
+
 		describe( 'getStyleNames', () => {
 			it( 'should return iterator with all style names', () => {
 				const names = [ 'color', 'position' ];