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

Tests: Improved ClassicEditorUI tests.

Aleksander Nowodzinski 8 лет назад
Родитель
Сommit
fa0ed1dcb8
1 измененных файлов с 4 добавлено и 3 удалено
  1. 4 3
      packages/ckeditor5-editor-classic/tests/classiceditorui.js

+ 4 - 3
packages/ckeditor5-editor-classic/tests/classiceditorui.js

@@ -37,7 +37,6 @@ describe( 'ClassicEditorUI', () => {
 	} );
 
 	afterEach( () => {
-		ui.destroy();
 		editor.destroy();
 	} );
 
@@ -198,8 +197,10 @@ describe( 'ClassicEditorUI', () => {
 		it( 'destroys the #view', () => {
 			const spy = sinon.spy( view, 'destroy' );
 
-			ui.destroy();
-			sinon.assert.calledOnce( spy );
+			return editor.destroy()
+				.then( () => {
+					sinon.assert.calledOnce( spy );
+				} );
 		} );
 	} );
 } );