       beforeEach ->
         rootView.deactivate()
         new RootView()
-        treeView = atom.loadPackage("tree-view").packageMain.createView()
+        treeView = window.loadPackage("tree-view").packageMain.createView()
 
       it "does not attach to the root view or create a root node when initialized", ->
         expect(treeView.hasParent()).toBeFalsy()

      RootView.deserialize(rootViewState)

      rootView.attachToDom()
      atom.loadPackage("tree-view")
      treeView = rootView.find(".tree-view").view()
      expect(treeView.find(".tree-view")).toMatchSelector ':focus'



      new RootView(rootDirPath)
      project = rootView.project
      window.loadPackage('tree-view')
      rootView.trigger 'tree-view:toggle'
      treeView = rootView.find(".tree-view").view()
      dirView = treeView.root.entries.find('.directory:contains(test-dir)').view()
