浏览代码

Merge pull request #202 from ckeditor/t/ckeditor5-engine/1179

Tests: Aligned tests to changes in view stringify utility. Read more https://githu…b.com/ckeditor/ckeditor5-engine/issues/1179.
Szymon Kupś 8 年之前
父节点
当前提交
2e1941602a
共有 1 个文件被更改,包括 8 次插入8 次删除
  1. 8 8
      packages/ckeditor5-utils/tests/_utils-tests/normalizehtml.js

+ 8 - 8
packages/ckeditor5-utils/tests/_utils-tests/normalizehtml.js

@@ -8,29 +8,29 @@ import normalizeHtml from '../../tests/_utils/normalizehtml';
 describe( 'utils', () => {
 	describe( 'normalizeHtml', () => {
 		it( 'should sort attributes', () => {
-			const actual = '<a style="border:1px;" class="" href="file://"></a>';
-			const expected = '<a class="" href="file://" style="border:1px;"></a>';
+			const actual = '<a style="border:1px" class="" href="file://"></a>';
+			const expected = '<a class="" href="file://" style="border:1px"></a>';
 
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );
 
 		it( 'should normalize styles', () => {
 			const actual = '<a style="border:1px"></a>';
-			const expected = '<a style="border:1px;"></a>';
+			const expected = '<a style="border:1px"></a>';
 
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );
 
 		it( 'should lowercase attributes', () => {
-			const actual = '<A CLASS="" HREF="file://" STYLE="border:1px;"></A>';
-			const expected = '<a class="" href="file://" style="border:1px;"></a>';
+			const actual = '<A CLASS="" HREF="file://" STYLE="border:1px"></A>';
+			const expected = '<a class="" href="file://" style="border:1px"></a>';
 
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );
 
 		it( 'should trim whitespace', () => {
 			const actual = '<a class="  " href="file://"      style="border:  1px"></a>';
-			const expected = '<a class="" href="file://" style="border:1px;"></a>';
+			const expected = '<a class="" href="file://" style="border:1px"></a>';
 
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );
@@ -49,9 +49,9 @@ describe( 'utils', () => {
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );
 
-		it( 'should not sort attribute value', () => {
+		it( 'should sort attribute value', () => {
 			const actual = '<a class="b c a"></a>';
-			const expected = actual;
+			const expected = '<a class="a b c"></a>';
 
 			expect( normalizeHtml( actual ) ).to.equal( expected );
 		} );