Browse Source

Add tests for view/Element.getNormalizedStyle().

Maciej Gołaszewski 6 năm trước cách đây
mục cha
commit
015475e5c2
1 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 12 0
      packages/ckeditor5-engine/tests/view/element.js

+ 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' ];