|
|
@@ -15,10 +15,11 @@ import { keyCodes } from '@ckeditor/ckeditor5-utils/src/keyboard';
|
|
|
testUtils.createSinonSandbox();
|
|
|
|
|
|
describe( 'Undo', () => {
|
|
|
- let editor;
|
|
|
+ let editor, editorElement;
|
|
|
|
|
|
beforeEach( () => {
|
|
|
- const editorElement = document.createElement( 'div' );
|
|
|
+ editorElement = document.createElement( 'div' );
|
|
|
+ document.body.appendChild( editorElement );
|
|
|
|
|
|
return ClassicTestEditor.create( editorElement, {
|
|
|
plugins: [ Undo ]
|
|
|
@@ -28,6 +29,12 @@ describe( 'Undo', () => {
|
|
|
} );
|
|
|
} );
|
|
|
|
|
|
+ afterEach( () => {
|
|
|
+ editorElement.remove();
|
|
|
+
|
|
|
+ return editor.destroy();
|
|
|
+ } );
|
|
|
+
|
|
|
it( 'should be loaded', () => {
|
|
|
expect( editor.plugins.get( Undo ) ).to.be.instanceOf( Undo );
|
|
|
} );
|