Better detection of DOM Nodes for equality

- Also use JSDom if a real one isn't present to get some more coverage
  there

- Fixes #1172
This commit is contained in:
Gregg Van Hove
2018-05-04 18:01:08 -07:00
parent f7097281c9
commit ced2b114e4
5 changed files with 75 additions and 37 deletions

View File

@@ -24,4 +24,11 @@ describe("jasmineUnderTest.pp (HTML Dependent)", function () {
expect(jasmineUnderTest.pp(err)).toMatch(/Not enough arguments/);
}
});
it("should stringify HTML element with text and attributes", function() {
var el = document.createElement('div');
el.setAttribute('things', 'foo');
el.innerHTML = 'foo';
expect(jasmineUnderTest.pp(el)).toEqual('<div things="foo">...</div>');
});
});