it("should merge text nodes around a comment", function () {
     var dom = HTMLSimpleDOM.build("<div>Text <!-- comment --> Text2</div>", true);
     expect(dom.children.length).toBe(1);
     var textNode = dom.children[0];
     expect(textNode.content).toBe("Text  Text2");
     expect(textNode.textSignature).toBeDefined();
 });
 it("should parse a document with an implied-close tag followed by a tag that forces it to close", function () {
     var result = HTMLSimpleDOM.build("<div><p>unclosed para<h1>heading that closes para</h1></div>", true);
     expect(result).not.toBeNull();
     expect(result.tag).toBe("div");
     expect(result.children[0].tag).toBe("p");
     expect(result.children[1].tag).toBe("h1");
 });
 it("should build simple DOM", function () {
     var dom = HTMLSimpleDOM.build(WellFormedDoc);
     expect(dom.tagID).toEqual(jasmine.any(Number));
     expect(dom.tag).toEqual("html");
     expect(dom.start).toEqual(16);
     expect(dom.end).toEqual(1269);
     expect(dom.subtreeSignature).toEqual(jasmine.any(Number));
     expect(dom.childSignature).toEqual(jasmine.any(Number));
     expect(dom.children.length).toEqual(5);
     var meta = dom.children[1].children[1];
     expect(Object.keys(meta.attributes).length).toEqual(1);
     expect(meta.attributes.charset).toEqual("utf-8");
     var titleContents = dom.children[1].children[5].children[0];
     expect(titleContents.content).toEqual("GETTING STARTED WITH BRACKETS");
     expect(titleContents.textSignature).toEqual(MurmurHash3.hashString(titleContents.content, titleContents.content.length, HTMLSimpleDOM._seed));
     expect(dom.children[1].parent).toEqual(dom);
     expect(dom.nodeMap[meta.tagID]).toBe(meta);
     expect(meta.childSignature).toEqual(jasmine.any(Number));
 });
 it("should handle empty attributes", function () {
     var dom = HTMLSimpleDOM.build("<input disabled>", true);
     expect(dom.attributes.disabled).toEqual("");
 });
 it("should return null if there is a tokenization failure", function () {
     expect(HTMLSimpleDOM.build("<div<badtag></div>", true)).toBeNull();
 });
 it("should return null if there are unclosed tags at the end of the document", function () {
     expect(HTMLSimpleDOM.build("<div>this has <b>multiple unclosed tags", true)).toBeNull();
 });
 it("should return null for an extra close tag", function () {
     expect(HTMLSimpleDOM.build("<p>this has an unopened bold</b> tag</p>", true)).toBeNull();
 });
 it("should return null for an unclosed non-void/non-implied-close tag", function () {
     expect(HTMLSimpleDOM.build("<p>this has an <b>unclosed bold tag</p>", true)).toBeNull();
 });
 it("should parse a document with balanced, void and self-closing tags", function () {
     expect(HTMLSimpleDOM.build("<p><b>some</b>awesome text</p><p>and <img> another <br/> para</p>", true)).not.toBeNull();
 });