   return dirPath
 
 getPaneFileName = (index) -> "test-file-#{index}.txt"
+
+# TODO: Remove this after atom/atom#13977 lands in favor of unguarded `getCenter()` calls
+getCenter = -> atom.workspace.getCenter?() ? atom.workspace
 
 describe "TreeView", ->
   [treeView, path1, path2, root1, root2, sampleJs, sampleTxt, workspaceElement] = []

          atom.commands.dispatch(treeView.element, 'tree-view:open-selected-entry-right')

    it "should have opened all windows", ->
      expect(atom.workspace.getPanes().length).toBe 9

    [0..8].forEach (index) ->
      paneNumber = index + 1

        activePaneItem = null

        beforeEach ->
          firstPane = getCenter().getPanes()[0]
          firstPane.activate()

          treeView.focus()
