浏览代码

Used "testUtils.checkAssertions()" in test (some element in Edge is rendered in different way).

Kamil Piechaczek 8 年之前
父节点
当前提交
58bc56b903
共有 1 个文件被更改,包括 16 次插入5 次删除
  1. 16 5
      packages/ckeditor5-link/tests/unlinkcommand.js

+ 16 - 5
packages/ckeditor5-link/tests/unlinkcommand.js

@@ -66,11 +66,22 @@ describe( 'UnlinkCommand', () => {
 
 				command.execute();
 
-				expect( getData( document ) ).to.equal(
-					'<$text bold="true" linkHref="url">f</$text>' +
-					'[<$text bold="true">ooba</$text>]' +
-					'<$text bold="true" linkHref="url">r</$text>'
-				);
+				const assertAll = () => {
+					expect( getData( document ) ).to.equal(
+						'<$text bold="true" linkHref="url">f</$text>' +
+						'[<$text bold="true">ooba</$text>]' +
+						'<$text bold="true" linkHref="url">r</$text>'
+					);
+				};
+
+				const assertEdge = () => {
+					expect( getData( document ) ).to.equal(
+						'<$text bold="true" linkHref="url">f</$text>' +
+						'[<$text bold="true">ooba]<$text linkHref="url">r</$text></$text>'
+					);
+				};
+
+				testUtils.checkAssertions( assertAll, assertEdge );
 			} );
 
 			it( 'should remove `linkHref` attribute from selected text when attributes have different value', () => {