Преглед изворни кода

Tests: Corrected tear down process.

Piotrek Koszuliński пре 8 година
родитељ
комит
abd3f84d77
1 измењених фајлова са 3 додато и 2 уклоњено
  1. 3 2
      packages/ckeditor5-editor-classic/tests/classiceditor.js

+ 3 - 2
packages/ckeditor5-editor-classic/tests/classiceditor.js

@@ -88,6 +88,7 @@ describe( 'ClassicEditor', () => {
 			expect( editor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
 		} );
 
+		// #53
 		it( 'creates an instance of a ClassicEditor child class', () => {
 			class CustomClassicEditor extends ClassicEditor {}
 
@@ -95,12 +96,12 @@ describe( 'ClassicEditor', () => {
 				plugins: [ Paragraph, Bold ]
 			} )
 			.then( newEditor => {
-				editor = newEditor;
-
 				expect( newEditor ).to.be.instanceof( CustomClassicEditor );
 				expect( newEditor ).to.be.instanceof( ClassicEditor );
 
 				expect( newEditor.getData() ).to.equal( '<p><strong>foo</strong> bar</p>' );
+
+				return newEditor.destroy();
 			} );
 		} );
 	} );