diff --git a/tests/bold/boldui.js b/tests/bold/boldui.js index 4eaab2d..0d516c5 100644 --- a/tests/bold/boldui.js +++ b/tests/bold/boldui.js @@ -14,12 +14,12 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'BoldUI', () => { - let editor, boldView; + let editor, boldView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -34,6 +34,8 @@ describe( 'BoldUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/code/codeui.js b/tests/code/codeui.js index 4d4adb0..a037cf3 100644 --- a/tests/code/codeui.js +++ b/tests/code/codeui.js @@ -14,12 +14,12 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'CodeUI', () => { - let editor, codeView; + let editor, codeView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -34,6 +34,8 @@ describe( 'CodeUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/italic/italicui.js b/tests/italic/italicui.js index 5ea0afb..e5a7540 100644 --- a/tests/italic/italicui.js +++ b/tests/italic/italicui.js @@ -15,12 +15,12 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'ItalicUI', () => { - let editor, italicView; + let editor, italicView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -35,6 +35,8 @@ describe( 'ItalicUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/strikethrough/strikethroughui.js b/tests/strikethrough/strikethroughui.js index 9d6fb12..c64e8ba 100644 --- a/tests/strikethrough/strikethroughui.js +++ b/tests/strikethrough/strikethroughui.js @@ -15,12 +15,12 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'StrikethroughUI', () => { - let editor, strikeView; + let editor, strikeView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -35,6 +35,8 @@ describe( 'StrikethroughUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/subscript/subscriptui.js b/tests/subscript/subscriptui.js index c0ccd67..d3a3c59 100644 --- a/tests/subscript/subscriptui.js +++ b/tests/subscript/subscriptui.js @@ -14,12 +14,12 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'SubscriptUI', () => { - let editor, subView; + let editor, subView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -34,6 +34,8 @@ describe( 'SubscriptUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/superscript/superscriptui.js b/tests/superscript/superscriptui.js index 4267b52..1242ce8 100644 --- a/tests/superscript/superscriptui.js +++ b/tests/superscript/superscriptui.js @@ -14,12 +14,12 @@ import testUtils from '@ckeditor/ckeditor5-core/tests/_utils/utils'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'SuperscriptUI', () => { - let editor, superView; + let editor, superView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -34,6 +34,8 @@ describe( 'SuperscriptUI', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } ); diff --git a/tests/underline/underlineui.js b/tests/underline/underlineui.js index 6c07d34..3171f12 100644 --- a/tests/underline/underlineui.js +++ b/tests/underline/underlineui.js @@ -15,12 +15,12 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard'; import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph'; describe( 'Underline', () => { - let editor, underlineView; + let editor, underlineView, editorElement; testUtils.createSinonSandbox(); beforeEach( () => { - const editorElement = document.createElement( 'div' ); + editorElement = document.createElement( 'div' ); document.body.appendChild( editorElement ); return ClassicTestEditor @@ -35,6 +35,8 @@ describe( 'Underline', () => { } ); afterEach( () => { + editorElement.remove(); + return editor.destroy(); } );