Skip to content

Commit b60581f

Browse files
authored
Merge pull request ckeditor#64 from ckeditor/t/ckeditor5/1341
Tests: Added a test checking memory leaks when the editor is created and destroyed (see ckeditor/ckeditor5#1341).
2 parents d4b3b25 + 55137b9 commit b60581f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"@ckeditor/ckeditor5-basic-styles": "^10.1.0",
3131
"@ckeditor/ckeditor5-block-quote": "^10.1.1",
3232
"@ckeditor/ckeditor5-ckfinder": "^10.0.0",
33+
"@ckeditor/ckeditor5-core": "^11.1.0",
3334
"@ckeditor/ckeditor5-dev-utils": "^11.0.1",
3435
"@ckeditor/ckeditor5-dev-webpack-plugin": "^7.0.1",
3536
"@ckeditor/ckeditor5-easy-image": "^10.0.4",

tests/ckeditor.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

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

1112
describe( 'ClassicEditor build', () => {
1213
let editor, editorElement;
@@ -23,7 +24,7 @@ describe( 'ClassicEditor build', () => {
2324
editor = null;
2425
} );
2526

26-
describe( 'buid', () => {
27+
describe( 'build', () => {
2728
it( 'contains plugins', () => {
2829
expect( ClassicEditor.builtinPlugins ).to.not.be.empty;
2930
} );
@@ -200,4 +201,10 @@ describe( 'ClassicEditor build', () => {
200201
} );
201202
} );
202203
} );
204+
205+
describeMemoryUsage( () => {
206+
testMemoryUsage(
207+
'should not grow on multiple create/destroy',
208+
() => ClassicEditor.create( document.querySelector( '#mem-editor' ) ) );
209+
} );
203210
} );

0 commit comments

Comments
 (0)