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 #42 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 8fa767c + 1e74b60 commit c677909
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/ballooneditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,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 { assertCKEditorError } from '@ckeditor/ckeditor5-utils/tests/_utils/utils';
import { removeEditorBodyOrphans } from '@ckeditor/ckeditor5-core/tests/_utils/cleanup';

describe( 'BalloonEditor', () => {
let editor, editorElement;
Expand Down Expand Up @@ -205,6 +206,9 @@ describe( 'BalloonEditor', () => {
);
}
)
.then( () => {
removeEditorBodyOrphans();
} )
.then( done )
.catch( done );
} );
Expand Down Expand Up @@ -341,7 +345,9 @@ describe( 'BalloonEditor', () => {
} );
} );

it( 'should not throw an error if editor was initialized with the data', () => {
it( 'should not throw an error if editor was initialized with the data', async () => {
await editor.destroy();

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

0 comments on commit c677909

Please sign in to comment.