8
0
Просмотр исходного кода

Merge pull request #70 from ckeditor/t/66

Fixed compatibility issues in tests.
Piotrek Koszuliński 9 лет назад
Родитель
Сommit
63ede1bac5
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      packages/ckeditor5-utils/tests/unicode.js

+ 3 - 2
packages/ckeditor5-utils/tests/unicode.js

@@ -9,8 +9,9 @@ describe( 'utils', () => {
 	describe( 'unicode', () => {
 		describe( 'isSurrogateHalf', () => {
 			it( 'should return true if given character is a surrogate half', () => {
-				// Half of pile of poo.
-				expect( isSurrogateHalf( '\uD83D' ) ).to.be.true;
+				// Half of pile of poo - U+D83D
+				// It is not string because of problem with Babel replacing half of the surrogate with actual (wrong) character.
+				expect( isSurrogateHalf( String.fromCharCode( 0xD83D ) ) ).to.be.true;
 			} );
 
 			it( 'should return false if given character is not a surrogate half', () => {