Commit 767295c4 authored by Marek Lewandowski's avatar Marek Lewandowski

Tests: Fixed tests leaking editor instance / DOM element.

parent d71d23a7
...@@ -45,6 +45,8 @@ describe( 'DecoupledEditor build', () => { ...@@ -45,6 +45,8 @@ describe( 'DecoupledEditor build', () => {
expect( newEditor.ui.view.element ).to.be.null; expect( newEditor.ui.view.element ).to.be.null;
expect( newEditor.ui.view.toolbar.element.parentElement ).to.be.null; expect( newEditor.ui.view.toolbar.element.parentElement ).to.be.null;
expect( newEditor.ui.view.editable.element.parentElement ).to.be.null; expect( newEditor.ui.view.editable.element.parentElement ).to.be.null;
return newEditor.destroy();
} ); } );
} ); } );
} ); } );
...@@ -56,6 +58,8 @@ describe( 'DecoupledEditor build', () => { ...@@ -56,6 +58,8 @@ describe( 'DecoupledEditor build', () => {
return DecoupledEditor.create( editorElement ) return DecoupledEditor.create( editorElement )
.then( newEditor => { .then( newEditor => {
expect( newEditor.ui.view.editable.element.parentElement ).to.equal( document.body ); expect( newEditor.ui.view.editable.element.parentElement ).to.equal( document.body );
return newEditor.destroy();
} ); } );
} ); } );
} ); } );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment