Maciej Gołaszewski пре 7 година
родитељ
комит
ce9e1ca539
1 измењених фајлова са 8 додато и 1 уклоњено
  1. 8 1
      packages/ckeditor5-build-decoupled-document/tests/ckeditor.js

+ 8 - 1
packages/ckeditor5-build-decoupled-document/tests/ckeditor.js

@@ -7,6 +7,7 @@
 
 import DecoupledEditor from '../src/ckeditor';
 import BaseDecoupledEditor from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor';
+import { describeMemoryUsage, testMemoryUsage } from '@ckeditor/ckeditor5-core/tests/_utils/memory';
 
 describe( 'DecoupledEditor build', () => {
 	let editor, editorData, editorElement;
@@ -25,7 +26,7 @@ describe( 'DecoupledEditor build', () => {
 		editor = null;
 	} );
 
-	describe( 'buid', () => {
+	describe( 'build', () => {
 		it( 'contains plugins', () => {
 			expect( DecoupledEditor.builtinPlugins ).to.not.be.empty;
 		} );
@@ -59,6 +60,12 @@ describe( 'DecoupledEditor build', () => {
 		} );
 	} );
 
+	describeMemoryUsage( () => {
+		testMemoryUsage(
+			'should not grow on multiple create/destroy',
+			() => DecoupledEditor.create( document.querySelector( '#mem-editor' ) ) );
+	} );
+
 	function test( getEditorDataOrElement ) {
 		describe( 'create()', () => {
 			beforeEach( () => {