       it('shoud ' + test.name, ->
         editor.iframeDoc.body.innerHTML = Tandem.Utils.cleanHtml(test.before)
         editor.doc.rebuildLines()
-        expect(editor.iframeDoc.body.innerHTML).to.equal(Tandem.Utils.cleanHtml(test.expected))
+        expect(Tandem.Utils.cleanHtml(editor.iframeDoc.body.innerHTML)).to.equal(Tandem.Utils.cleanHtml(test.expected))
       )
     )
   )

#= require tandem/editor


describe('Document', ->
  describe('.normalize()', ->
    editor = new Tandem.Editor('editor-container')
    tests = [{
      name: 'initialize empty document'
      before: ''
      expected: '<div><br></div>'
    }, {
      name: 'tranform equivalent styles'
      before:
        '<div>

          <span>Span</span>
        </div>'
    }, {
      name: 'wrap text nodes'
      before: 
        '<div>Hey</div>'
      expected:
        '<div>
          <span>Hey</span>
        </div>'  
    }]
    # TODO test disallowed tags

