       it "does not attach to the root view but does create a root node when initialized", ->
         rootView.deactivate()
         new RootView(require.resolve('fixtures/tree-view/tree-view.js'))
-        treeView = atom.loadPackage("tree-view").packageMain.createView()
+        treeView = window.loadPackage("tree-view").packageMain.createView()
         expect(treeView.hasParent()).toBeFalsy()
         expect(treeView.root).toExist()
 

    new RootView(require.resolve('fixtures/tree-view'))
    project = rootView.project

    atom.loadPackage("tree-view")
    rootView.trigger 'tree-view:toggle'
    treeView = rootView.find(".tree-view").view()
    treeView.root = treeView.find('ol > li:first').view()

      RootView.deserialize(rootViewState)

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

