Explorar el Código

Tests: Fixed tests leaking editor instance / DOM element.

Marek Lewandowski hace 6 años
padre
commit
bcb7b83719
Se han modificado 1 ficheros con 2 adiciones y 3 borrados
  1. 2 3
      packages/ckeditor5-code-block/tests/codeblockui.js

+ 2 - 3
packages/ckeditor5-code-block/tests/codeblockui.js

@@ -161,9 +161,8 @@ describe( 'CodeBlockUI', () => {
 				expect( listView.items.get( 2 ).children.first.isOn ).to.be.true;
 			} );
 
-			it( 'uses localized "Plain text" label', () => {
-				const element = document.createElement( 'div' );
-				document.body.appendChild( element );
+			it( 'uses localized "Plain text" label', async () => {
+				await editor.destroy();
 
 				return ClassicTestEditor
 					.create( element, {