Browse Source

Add memory leak test.

Maciej Gołaszewski 7 years ago
parent
commit
14ad8eb299
1 changed files with 7 additions and 0 deletions
  1. 7 0
      packages/ckeditor5-build-inline/tests/ckeditor.js

+ 7 - 0
packages/ckeditor5-build-inline/tests/ckeditor.js

@@ -7,6 +7,7 @@
 
 
 import InlineEditor from '../src/ckeditor';
 import InlineEditor from '../src/ckeditor';
 import BaseInlineEditor from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor';
 import BaseInlineEditor from '@ckeditor/ckeditor5-editor-inline/src/inlineeditor';
+import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
 
 
 describe( 'InlineEditor build', () => {
 describe( 'InlineEditor build', () => {
 	let editor, editorElement;
 	let editor, editorElement;
@@ -155,4 +156,10 @@ describe( 'InlineEditor build', () => {
 			expect( editor.getData() ).to.equal( data );
 			expect( editor.getData() ).to.equal( data );
 		} );
 		} );
 	} );
 	} );
+
+	describeMemoryUsage( () => {
+		testMemoryUsage(
+			'should not grow on multiple create/destroy',
+			() => InlineEditor.create( document.querySelector( '#mem-editor' ) ) );
+	} );
 } );
 } );