Explorar el Código

Added missing destroy in tests.

Oskar Wróbel hace 6 años
padre
commit
db1044cb20

+ 4 - 2
packages/ckeditor5-list/tests/listui.js

@@ -15,10 +15,10 @@ import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
 describe( 'ListUI', () => {
-	let editor, model, bulletedListButton, numberedListButton;
+	let editorElement, editor, model, bulletedListButton, numberedListButton;
 
 	beforeEach( () => {
-		const editorElement = document.createElement( 'div' );
+		editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );
 
 		return ClassicTestEditor.create( editorElement, { plugins: [ Paragraph, BlockQuote, ListEditing, ListUI ] } )
@@ -32,6 +32,8 @@ describe( 'ListUI', () => {
 	} );
 
 	afterEach( () => {
+		editorElement.remove();
+
 		return editor.destroy();
 	} );
 

+ 4 - 2
packages/ckeditor5-list/tests/todolistui.js

@@ -14,10 +14,10 @@ import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import { setData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model';
 
 describe( 'TodoListUI', () => {
-	let editor, model, button;
+	let editorElement, editor, model, button;
 
 	beforeEach( () => {
-		const editorElement = document.createElement( 'div' );
+		editorElement = document.createElement( 'div' );
 		document.body.appendChild( editorElement );
 
 		return ClassicTestEditor.create( editorElement, { plugins: [ Paragraph, TodoListEditing, TodoListUI ] } )
@@ -30,6 +30,8 @@ describe( 'TodoListUI', () => {
 	} );
 
 	afterEach( () => {
+		editorElement.remove();
+
 		return editor.destroy();
 	} );