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 #64 from ckeditor/t/ckeditor5/1341
Browse files Browse the repository at this point in the history
Tests: Added a test checking memory leaks when the editor is created and destroyed (see ckeditor/ckeditor5#1341).
  • Loading branch information
oleq authored Jan 22, 2019
2 parents d4b3b25 + 55137b9 commit b60581f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@ckeditor/ckeditor5-basic-styles": "^10.1.0",
"@ckeditor/ckeditor5-block-quote": "^10.1.1",
"@ckeditor/ckeditor5-ckfinder": "^10.0.0",
"@ckeditor/ckeditor5-core": "^11.1.0",
"@ckeditor/ckeditor5-dev-utils": "^11.0.1",
"@ckeditor/ckeditor5-dev-webpack-plugin": "^7.0.1",
"@ckeditor/ckeditor5-easy-image": "^10.0.4",
Expand Down
9 changes: 8 additions & 1 deletion tests/ckeditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import ClassicEditor from '../src/ckeditor';
import BaseClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';

describe( 'ClassicEditor build', () => {
let editor, editorElement;
Expand All @@ -23,7 +24,7 @@ describe( 'ClassicEditor build', () => {
editor = null;
} );

describe( 'buid', () => {
describe( 'build', () => {
it( 'contains plugins', () => {
expect( ClassicEditor.builtinPlugins ).to.not.be.empty;
} );
Expand Down Expand Up @@ -200,4 +201,10 @@ describe( 'ClassicEditor build', () => {
} );
} );
} );

describeMemoryUsage( () => {
testMemoryUsage(
'should not grow on multiple create/destroy',
() => ClassicEditor.create( document.querySelector( '#mem-editor' ) ) );
} );
} );

0 comments on commit b60581f

Please sign in to comment.