 describe('DOM', ->
-  testContainer = $('#test-container').get(0)
-  expectContainer = $('#expected-container').get(0)
-
   beforeEach( ->
-    $(testContainer).html('')
+    @container = $('#test-container').html('').get(0)
   )
 
   describe('classes', ->
     afterEach( ->
-      $(testContainer).removeClass()
+      $(@container).removeClass()
     )
 
     it('addClass', ->
-      Quill.DOM.addClass(testContainer, 'custom')
-      expect($(testContainer).hasClass('custom')).to.be(true)
+      Quill.DOM.addClass(@container, 'custom')
+      expect($(@container).hasClass('custom')).to.be(true)
     )
 
     it('getClasses', ->
-      $(testContainer).addClass('custom')
-      $(testContainer).addClass('another')
-      classes = Quill.DOM.getClasses(testContainer)
+      $(@container).addClass('custom')
+      $(@container).addClass('another')
+      classes = Quill.DOM.getClasses(@container)
       expect(_.union(classes, ['custom', 'another']).length).to.equal(2)
     )
 
     it('hasClass', ->
-      $(testContainer).addClass('custom')
-      expect(Quill.DOM.hasClass(testContainer, 'custom')).to.be(true)
+      $(@container).addClass('custom')
+      expect(Quill.DOM.hasClass(@container, 'custom')).to.be(true)
     )
 
     it('removeClass', ->
-      $(testContainer).addClass('custom')
-      Quill.DOM.removeClass(testContainer, 'custom')
-      expect($(testContainer).hasClass('custom')).to.be(false)
+      $(@container).addClass('custom')
+      Quill.DOM.removeClass(@container, 'custom')
+      expect($(@container).hasClass('custom')).to.be(false)
     )
 
     it('toggleClass', ->
-      Quill.DOM.toggleClass(testContainer, 'custom')
-      expect($(testContainer).hasClass('custom')).to.be(true)
-      Quill.DOM.toggleClass(testContainer, 'custom')
-      expect($(testContainer).hasClass('custom')).to.be(false)
+      Quill.DOM.toggleClass(@container, 'custom')
+      expect($(@container).hasClass('custom')).to.be(true)
+      Quill.DOM.toggleClass(@container, 'custom')
+      expect($(@container).hasClass('custom')).to.be(false)
     )
   )
 
   describe('attributes', ->
     beforeEach( ->
-      $(testContainer).html('<div class="custom" style="color: red;"></div>')
-      @node = testContainer.firstChild
+      $(@container).html('<div class="custom" style="color: red;"></div>')
+      @node = @container.firstChild
     )
 
     it('getAttributes', ->

        </div>'
      )
      # IE8 does not define firstElementChild
      @button = testContainer.firstChild.children[0]
      @select = testContainer.firstChild.children[1]
    )

    it('addEventListener click', (done) ->


  describe('get nodes', ->
    it('getChildNodes', ->
      @container.innerHTML = '<b>0</b><i>1</i><u>2</u><br>'
      nodes = Quill.DOM.getChildNodes(@container)
      expect(nodes.length).to.equal(4)
    )

    it('getDescendants', ->
      @container.innerHTML = '<b>0</b><i><span>1</span><s>2</s></i><u>3</u><br>'
      nodes = Quill.DOM.getDescendants(@container)
      expect(nodes.length).to.equal(6)
    )
  )
