             atom.workspace.getActivePaneItem().saveAs(path.join(projectPath, 'test.txt'))
             expect(treeView.hasParent()).toBeTruthy()
             expect(fs.absolute(treeView.root.getPath())).toBe fs.absolute(projectPath)
-            expect(treeView.root.parent()).toMatchSelector(".tree-view")
+            expect($(treeView.root).parent()).toMatchSelector(".tree-view")
 
     describe "when the root view is opened to a file path", ->
       it "does not attach to the root view but does create a root node when initialized", ->

        sampleJs.trigger clickEvent(originalEvent: { detail: 1 })

      runs ->
        subdir = treeView.root.find('.directory:first').view()
        subdir.trigger clickEvent(originalEvent: { detail: 1 })
        expect(subdir).toHaveClass 'selected'
        expect(subdir).toHaveClass 'expanded'

        runs ->
          treeView = atom.packages.getActivePackage("tree-view").mainModule.createView()
          expect(treeView.hasParent()).toBeTruthy()
          expect(treeView.root).toBeTruthy()

    describe "when the project is a .git folder", ->
      it "does not create the tree view", ->
