Skip to content

Commit 765c011

Browse files
committed
Add memory leak test.
1 parent d4b3b25 commit 765c011

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

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)