Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #102 from ckeditor/i/6002
Browse files Browse the repository at this point in the history
Tests: Fixed tests leaking editor instances / DOM elements. See ckeditor/ckeditor5#6002.
  • Loading branch information
pomek authored Jan 7, 2020
2 parents 1c955cd + adaf685 commit c3e2f5e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/classiceditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils';

import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset';
import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
import { removeEditorBodyOrphans } from '@ckeditor/ckeditor5-core/tests/_utils/cleanup';

describe( 'ClassicEditor', () => {
let editor, editorElement;
Expand Down Expand Up @@ -209,6 +210,7 @@ describe( 'ClassicEditor', () => {
initialData: '<p>I am evil!</p>',
plugins: [ Paragraph ]
} ).catch( () => {
removeEditorBodyOrphans();
done();
} );
} );
Expand Down Expand Up @@ -309,7 +311,9 @@ describe( 'ClassicEditor', () => {
} );
} );

it( 'does not update the source element if editor was initialized with data', () => {
it( 'does not update the source element if editor was initialized with data', async () => {
await editor.destroy();

return ClassicEditor
.create( '<p>Foo.</p>', {
plugins: [ Paragraph, Bold ]
Expand Down

0 comments on commit c3e2f5e

Please sign in to comment.