From 7d1fdbdf30fb4df7437ce3b6a1fb8b2c1ac56c79 Mon Sep 17 00:00:00 2001 From: abe33 Date: Tue, 5 Jul 2016 15:26:45 +0200 Subject: [PATCH] :white_check_mark: Add test for package deactivation --- spec/minimap-main-spec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/spec/minimap-main-spec.js b/spec/minimap-main-spec.js index 60dd8703..9068fb11 100644 --- a/spec/minimap-main-spec.js +++ b/spec/minimap-main-spec.js @@ -55,6 +55,15 @@ describe('Minimap package', () => { it('attaches a minimap element to the editor view', () => { expect(editorElement.shadowRoot.querySelector('atom-text-editor-minimap')).toExist() }) + + describe('when the package is deactivated', () => { + beforeEach(() => { + atom.packages.deactivatePackage('minimap') + }) + it('removes the minimap from their editor parent', () => { + expect(editorElement.shadowRoot.querySelector('atom-text-editor-minimap')).not.toExist() + }) + }) }) describe('::observeMinimaps', () => {