 # Main
 # -------------------------
 describe "narrow", ->
-  [editor, editorElement] = []
+  [editor, editorElement, main] = []
   [provider, ui, ensure, narrow] = []
 
   waitsForStartNarrow = (providerName, options) ->


      runs ->
        ensure text: originalText

  describe "narrow:next-item, narrow:previous-item", ->
    nextItem = -> runs -> narrow.waitsForConfirm -> runCommand('narrow:next-item')


  beforeEach ->
    waitsForPromise ->
      atom.packages.activatePackage('narrow').then (pack) ->
        main = pack.mainModule

    waitsForPromise ->
      atom.workspace.open().then (_editor) ->
