$(document).ready(function(){ module("testMultiAttr"); test("test1", function() { expect(1); var expected = '<p a1="foo" a2="bar">hello world</p>'; $("#sandbox").html(''); $("#editor").html('
hello world
'); var editor = CodeMirror.fromTextArea($("#editor")[0]); var result = $(".CodeMirror-lines div div pre")[0].innerHTML; equal(result, expected); $("#editor").html(""); }); });