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

Fixed tests leaking editor instance / DOM element. #102

Merged
merged 2 commits into from
Jan 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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