ソースを参照

Tests: Fixed tests leaking editor instance / DOM element.

Marek Lewandowski 6 年 前
コミット
c85470b399

+ 2 - 0
packages/ckeditor5-enter/tests/enter.js

@@ -31,6 +31,8 @@ describe( 'Enter feature', () => {
 	afterEach( () => {
 	afterEach( () => {
 		element.remove();
 		element.remove();
 		sinon.restore();
 		sinon.restore();
+
+		return editor.destroy();
 	} );
 	} );
 
 
 	it( 'creates the commands', () => {
 	it( 'creates the commands', () => {

+ 2 - 0
packages/ckeditor5-enter/tests/shiftenter.js

@@ -31,6 +31,8 @@ describe( 'ShiftEnter feature', () => {
 	afterEach( () => {
 	afterEach( () => {
 		element.remove();
 		element.remove();
 		sinon.restore();
 		sinon.restore();
+
+		return editor.destroy();
 	} );
 	} );
 
 
 	it( 'creates the commands', () => {
 	it( 'creates the commands', () => {