mirror of
https://github.com/atom/atom.git
synced 2026-01-22 21:38:10 -05:00
Don’t clear commands after specs
Commands are typically registered once at eval time. Clearing them means that commands aren’t available except in the first spec.
This commit is contained in:
@@ -121,8 +121,6 @@ beforeEach ->
|
||||
addCustomMatchers(this)
|
||||
|
||||
afterEach ->
|
||||
atom.commands.clear()
|
||||
|
||||
atom.packages.deactivatePackages()
|
||||
atom.menu.template = []
|
||||
|
||||
|
||||
@@ -178,9 +178,6 @@ class CommandRegistry
|
||||
break if propagationStopped
|
||||
currentTarget = currentTarget.parentNode
|
||||
|
||||
clear: ->
|
||||
@listenersByCommandName = {}
|
||||
|
||||
class CommandListener
|
||||
constructor: (@selector, @callback) ->
|
||||
@specificity = (SpecificityCache[@selector] ?= specificity(@selector))
|
||||
|
||||
Reference in New Issue
Block a user