From 67ff8f43828f2b0644cf9f0b5addbe83b4c7e94e Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Wed, 17 Sep 2014 19:11:16 -0600 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20clear=20commands=20after=20spec?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commands are typically registered once at eval time. Clearing them means that commands aren’t available except in the first spec. --- spec/spec-helper.coffee | 2 -- src/command-registry.coffee | 3 --- 2 files changed, 5 deletions(-) diff --git a/spec/spec-helper.coffee b/spec/spec-helper.coffee index 48fad5c8c..c4f39bbb7 100644 --- a/spec/spec-helper.coffee +++ b/spec/spec-helper.coffee @@ -121,8 +121,6 @@ beforeEach -> addCustomMatchers(this) afterEach -> - atom.commands.clear() - atom.packages.deactivatePackages() atom.menu.template = [] diff --git a/src/command-registry.coffee b/src/command-registry.coffee index 984a604f2..dc173dc97 100644 --- a/src/command-registry.coffee +++ b/src/command-registry.coffee @@ -178,9 +178,6 @@ class CommandRegistry break if propagationStopped currentTarget = currentTarget.parentNode - clear: -> - @listenersByCommandName = {} - class CommandListener constructor: (@selector, @callback) -> @specificity = (SpecificityCache[@selector] ?= specificity(@selector))