 
     it "toggle focus between provider.editor and ui.editor", ->
       ensureEditorIsActive(ui.editor)
-      dispatchEditorCommand('narrow:focus')
-      ensureEditorIsActive(editor)
-      dispatchEditorCommand('narrow:focus')
-      ensureEditorIsActive(ui.editor)
+      runCommand('narrow:focus'); ensureEditorIsActive(editor)
+      runCommand('narrow:focus'); ensureEditorIsActive(ui.editor)
+      runCommand('narrow:focus'); ensureEditorIsActive(editor)
 
   describe "narrow:focus-prompt", ->
     beforeEach ->

        setActiveTextEditorWithWaits(editor2)

        runs ->
          expect(provider.editor).toBe(editor2)
          ensure selectedItemText: "line 2"
          editor2.setCursorBufferPosition([1, 0]); ensure selectedItemText: "line 2"
          editor2.setCursorBufferPosition([3, 0]); ensure selectedItemText: "line 4"
          editor2.setCursorBufferPosition([5, 0]); ensure selectedItemText: "line 6"
          editor2.setCursorBufferPosition([7, 0]); ensure selectedItemText: "line 8"

          editor2.moveToTop()
          ensureEditor editor2, cursor: [0, 0]

  setActiveTextEditor
  setActiveTextEditorWithWaits
} = require "./spec-helper"
runCommand = dispatchEditorCommand

appleGrapeLemmonText = """
  apple
