         expect(symbolsView.cachedTags).toEqual {}
 
     it "displays an error when no tags match text in mini-editor", ->
-      waitsForPromise ->
-        atom.workspace.open('sample.js')
-
       runs ->
         atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")
 

        expect(symbolsView.error).not.toBeVisible()

    it "caches tags until the editor changes", ->
      waitsForPromise ->
        atom.workspace.open('sample.js')

      runs ->
        editor = atom.workspace.getActiveTextEditor()
        atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")

    jasmine.attachToDOM(getWorkspaceView())

  describe "when tags can be generated for a file", ->
    beforeEach ->
      waitsForPromise ->
        atom.workspace.open('sample.js')

    it "initially displays all JavaScript functions with line numbers", ->
      runs ->
        atom.commands.dispatch(getEditorView(), "symbols-view:toggle-file-symbols")

