       'display': 'inline'
 
     it('should retrieve styles', ->
-      $(testContainer).html(html)
-      result = Quill.DOM.getStyles(testContainer.firstChild)
+      $(@container).html(html)
+      result = Quill.DOM.getStyles(@container.firstChild)
       expect(result).to.eql(styles)
     )
 
     it('should set styles', ->
-      $(testContainer).html('<span>Test</span>')
-      Quill.DOM.setStyles(testContainer.firstChild, styles)
-      expect.equalHTML(testContainer.firstChild.outerHTML, html)
+      $(@container).html('<span>Test</span>')
+      Quill.DOM.setStyles(@container.firstChild, styles)
+      expect.equalHTML(@container.firstChild.outerHTML, html)
     )
   )
 
   describe('events', ->
     beforeEach( ->
-      $(testContainer).html('
+      $(@container).html('
         <div>
           <button type="button">Button</button>
           <select>


  describe('text', ->
    beforeEach( ->
      $(testContainer).html('0<span>1</span><!-- Comment --><b><i>2</i></b>3<br>')
    )

    it('should retrieve text', ->
      expect(Quill.DOM.getText(testContainer)).to.equal('0123')
    )

    it('should set element text', ->
      Quill.DOM.setText(testContainer, 'test')
      expect($(testContainer).text()).to.equal('test')
    )

    it('should set text node text', ->
      Quill.DOM.setText(testContainer.firstChild, 'A')
      expect($(testContainer).text()).to.equal('A123')
    )

    it('should get all text nodes', ->
      textNodes = Quill.DOM.getTextNodes(testContainer)
      expect(textNodes.length).to.equal(4)
    )
  )

  describe('manipulation', ->
    beforeEach( ->
      $(testContainer).html('<div style="cursor: pointer">One</div><div><span>Two</span><b>Bold</b></div>')
    )

    it('moveChildren', ->
      Quill.DOM.moveChildren(testContainer.firstChild, testContainer.lastChild)
      expect.equalHTML(testContainer, '<div style="cursor: pointer>One<span>Two</span><b>Bold</b></div><div></div>')
    )

    it('removeNode', ->
      Quill.DOM.removeNode(testContainer.lastChild.firstChild)
      expect.equalHTML(testContainer, '<div style="cursor: pointer>One</div><div><b>Bold</b></div>')
    )

    it('switchTag', ->
      Quill.DOM.switchTag(testContainer.firstChild, 'span')
      expect.equalHTML(testContainer, '<span style="cursor: pointer>One</span><div><span>Two</span><b>Bold</b></div>')
    )

    it('unwrap', ->
      Quill.DOM.unwrap(testContainer.lastChild)
      expect.equalHTML(testContainer, '<div style="cursor: pointer>One</div><span>Two</span><b>Bold</b>')
    )

    it('wrap', ->
      wrapper = testContainer.ownerDocument.createElement('div')
      Quill.DOM.wrap(wrapper, testContainer.firstChild)
      expect.equalHTML(testContainer, '<div><div style="cursor: pointer>One</div></div><div><span>Two</span><b>Bold</b></div>')
    )
  )

  describe('select', ->
    beforeEach( ->
      $(testContainer).html('
        <select>
          <option value="one">One</option>
          <option value="two" selected>Two</option>
        </select>
      ')
      @select = testContainer.children[0]
      $(@select).val('one')
    )



  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)
    )
  )
