Explorar o código

Fix typing test.

Maciej Gołaszewski %!s(int64=6) %!d(string=hai) anos
pai
achega
d287b8b351
Modificáronse 1 ficheiros con 11 adicións e 2 borrados
  1. 11 2
      packages/ckeditor5-mention/tests/mentionediting.js

+ 11 - 2
packages/ckeditor5-mention/tests/mentionediting.js

@@ -220,6 +220,15 @@ describe( 'MentionEditing', () => {
 		} );
 
 		describe( 'typing integration', () => {
+			beforeEach( () => {
+				return createTestEditor()
+					.then( newEditor => {
+						editor = newEditor;
+						model = editor.model;
+						doc = model.document;
+					} );
+			} );
+
 			it( 'should remove mention attribute from a selection if selection is on right side of a mention', () => {
 				editor.setData( '<p>foo <span class="mention" data-mention="John">@John</span>bar</p>' );
 
@@ -283,9 +292,9 @@ describe( 'MentionEditing', () => {
 
 					editor.execute( 'undo' );
 
-					expect( editor.getData() ).to.equal( '<p>foo <span class="mention" data-mention="John">@John</span> bar</p>' )
+					expect( editor.getData() ).to.equal( '<p>foo <span class="mention" data-mention="John">@John</span> bar</p>' );
 					expect( getViewData( editor.editing.view ) )
-						.to.equal( '<p>foo <span class="mention" data-mention="John">@John</span> bar</p>' );;
+						.to.equal( '<p>foo <span class="mention" data-mention="John">@John</span> bar</p>' );
 				} );
 
 				// Failing test. See ckeditor/ckeditor5#1645.