Browse Source

Cleanup editor ui editable root element in code block integration tests.

Maciej Gołaszewski 5 years ago
parent
commit
2d70de310a
1 changed files with 2 additions and 13 deletions
  1. 2 13
      packages/ckeditor5-code-block/tests/codeblock-integration.js

+ 2 - 13
packages/ckeditor5-code-block/tests/codeblock-integration.js

@@ -3,8 +3,6 @@
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
  */
 
-/* globals document */
-
 import ClassicTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/classictesteditor';
 import Enter from '@ckeditor/ckeditor5-enter/src/enter';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
@@ -29,17 +27,6 @@ function getEditor( initialData = '' ) {
 }
 
 describe( 'CodeBlock - integration', () => {
-	let element;
-
-	beforeEach( () => {
-		element = document.createElement( 'div' );
-		document.body.appendChild( element );
-	} );
-
-	afterEach( () => {
-		element.remove();
-	} );
-
 	describe( 'with Markdown GFM', () => {
 		it( 'should be loaded and returned from the editor', async () => {
 			const markdown =
@@ -51,6 +38,8 @@ describe( 'CodeBlock - integration', () => {
 
 			expect( editor.getData() ).to.equal( markdown );
 
+			editor.ui.view.editable.element.remove();
+
 			await editor.destroy();
 		} );
 	} );