Explorar el Código

Merge pull request #47 from ckeditor/i/6002

Tests: Fixed tests leaking editor instances / DOM elements. See ckeditor/ckeditor5#6002.
Kamil Piechaczek hace 6 años
padre
commit
8743090447
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      packages/ckeditor5-editor-decoupled/tests/decouplededitor.js

+ 4 - 0
packages/ckeditor5-editor-decoupled/tests/decouplededitor.js

@@ -22,6 +22,7 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';
 import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
 import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
 import { assertCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
+import { removeEditorBodyOrphans } from '@ckeditor/ckeditor5-core/tests/_utils/cleanup';
 
 const editorData = '<p><strong>foo</strong> bar</p>';
 
@@ -186,6 +187,9 @@ describe( 'DecoupledEditor', () => {
 						);
 					}
 				)
+				.then( () => {
+					removeEditorBodyOrphans();
+				} )
 				.then( done )
 				.catch( done );
 		} );