From 9b4120e52603f46020dbe29c69f6e3bec790b2b5 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 26 Nov 2020 23:02:10 +0100 Subject: [PATCH] Fix Editor tests --- src/block_manager/index.js | 2 +- test/specs/editor/index.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/block_manager/index.js b/src/block_manager/index.js index 75f2a819b..e5877e883 100644 --- a/src/block_manager/index.js +++ b/src/block_manager/index.js @@ -262,7 +262,7 @@ export default () => { blocks.stopListening(); blocksVisible.reset(); categories.reset(); - blocksView.remove(); + blocksView && blocksView.remove(); [blocks, blocksVisible, categories, blocksView].forEach(i => (i = null)); c = {}; } diff --git a/test/specs/editor/index.js b/test/specs/editor/index.js index 0efcfbd59..1eb70a084 100644 --- a/test/specs/editor/index.js +++ b/test/specs/editor/index.js @@ -3,10 +3,11 @@ import Editor from 'editor'; const { keys } = Object; const initComps = 1; -describe('Editor', () => { - const editor = new Editor(); +describe.only('Editor', () => { + let editor; beforeEach(() => { + editor = new Editor(); editor.init(); });