Browse Source

Merge pull request #47 from ckeditor/i/6002

Tests: Fixed tests leaking editor instances / DOM elements. See ckeditor/ckeditor5#6002.
Kamil Piechaczek 6 years ago
parent
commit
f6ea6a9bdb
1 changed files with 3 additions and 4 deletions
  1. 3 4
      packages/ckeditor5-highlight/tests/highlightui.js

+ 3 - 4
packages/ckeditor5-highlight/tests/highlightui.js

@@ -236,13 +236,12 @@ describe( 'HighlightUI', () => {
 						language: 'pl'
 					} )
 					.then( newEditor => {
-						editor = newEditor;
-						dropdown = editor.ui.componentFactory.create( 'highlight' );
-						command = editor.commands.get( 'highlight' );
+						dropdown = newEditor.ui.componentFactory.create( 'highlight' );
+						command = newEditor.commands.get( 'highlight' );
 
 						editorElement.remove();
 
-						return editor.destroy();
+						return newEditor.destroy();
 					} );
 			}
 		} );