       [elementA, elementB, events] = []
 
       beforeEach ->
-        elementA = appendContent($$(->
-          @div { 'class': 'a' }, ->
-            @div 'class': 'b c'
-        ))
+        elementA = appendContent $$ ->
+          @div class: 'a', ->
+            @div class: 'b c d'
         elementB = elementA.firstChild
 
         events = []

        assert.deepEqual(events, ['abc-secret-code'])

    it "only counts entire keystrokes when checking for partial matches", ->
      element = $$(->
        @div 'class': 'a'
      )
      keymapManager.add 'test',
        '.a':
          'ctrl-alt-a': 'command-a'

      assert.deepEqual(events, ['command'])

    it "simulates bubbling if the target is detached", ->
      elementA = $$ ->
        @div class: 'a', ->
          @div class: 'b', ->
            @div class: 'c'
      elementB = elementA.firstChild
      elementC = elementB.firstChild

