Explorar el Código

Tests: Improved ClassicEditorUI tests.

Aleksander Nowodzinski hace 8 años
padre
commit
fa0ed1dcb8
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  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 );
+				} );
 		} );
 	} );
 } );