 
         entryCount = treeView.find(".entry").length
         _.times entryCount, -> treeView.moveDown()
-        expect(treeView.scrollBottom()).toBe treeView.prop('scrollHeight')
+        expect(treeView.scrollBottom() + 2).toBe treeView.prop('scrollHeight')
 
         _.times entryCount, -> treeView.moveUp()
         expect(treeView.scrollTop()).toBe 0


        beforeEach ->
          nested = treeView.root.find('.directory:eq(2)').view()
          expect(nested.find('.header').text()).toContain 'nested/'
          nested.expand()
          nested2 = nested.entries.find('.entry:last').view()
          nested2.click()

      treeView.root.disclosureArrow.click()

      # previously expanded descendants remain expanded
      expect(treeView.root.find('> .entries > li:contains(dir1) > .entries > li:contains(sub-dir1) > .entries').length).toBe 1

      # collapsed descendants remain collapsed
      expect(treeView.root.find('> .entries > li.contains(dir2) > .entries')).not.toExist()

    it "when collapsing a directory, removes change subscriptions from the collapsed directory and its descendants", ->
      child = treeView.root.entries.find('li:contains(dir1)').view()
      child.disclosureArrow.click()

      grandchild = child.entries.find('li:contains(sub-dir1)').view()
      grandchild.disclosureArrow.click()

      expect(treeView.root.directory.subscriptionCount()).toBe 1
