ソースを参照

Tests: Corrected unit test after wrong merge resolution.

Krzysztof Krztoń 7 年 前
コミット
4177e1ff98

+ 5 - 5
packages/ckeditor5-paste-from-office/tests/filters/utils.js

@@ -13,21 +13,21 @@ describe( 'Filters', () => {
 	describe( 'Utils', () => {
 		describe( 'parseHtml', () => {
 			it( 'correctly parses HTML with body and one style tag', () => {
-				const html = '<head><style>p { color: red; } a { border: none; }</style></head><body><p>Foo Bar</p></body>';
+				const html = '<head><style>p { color: red; } a { font-size: 12px; }</style></head><body><p>Foo Bar</p></body>';
 				const { body, bodyString, styles, stylesString } = parseHtml( html );
 
 				expect( body ).to.instanceof( DocumentFragment );
-				expect( body.childCount ).to.equal( 1 );
+				expect( body.childCount ).to.equal( 1, 'body.childCount' );
 
 				expect( bodyString ).to.equal( '<p>Foo Bar</p>' );
 
-				expect( styles.length ).to.equal( 1 );
+				expect( styles.length ).to.equal( 1, 'styles.length' );
 				expect( styles[ 0 ] ).to.instanceof( CSSStyleSheet );
 				expect( styles[ 0 ].cssRules.length ).to.equal( 2 );
 				expect( styles[ 0 ].cssRules[ 0 ].style.color ).to.equal( 'red' );
-				expect( styles[ 0 ].cssRules[ 1 ].style.border ).to.equal( 'none' );
+				expect( styles[ 0 ].cssRules[ 1 ].style[ 'font-size' ] ).to.equal( '12px' );
 
-				expect( stylesString ).to.equal( 'p { color: red; } a { border: none; }' );
+				expect( stylesString ).to.equal( 'p { color: red; } a { font-size: 12px; }' );
 			} );
 
 			it( 'correctly parses HTML with body contents only', () => {