html-normalizer
Advanced tools
Comparing version 1.0.9 to 1.1.0
{ | ||
"name": "html-normalizer", | ||
"version": "1.0.9", | ||
"version": "1.1.0", | ||
"description": "Used to normalize html and jsx to strings so they can be used in assertions.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -26,3 +26,3 @@ # Normalizer (html-normalizer) | ||
Overtime this becomes difficult read. Especially when testing large DOM trees. Here is an alternate approach: | ||
Overtime this becomes to difficult read. Especially when testing large DOM trees. Here is an alternate approach: | ||
@@ -32,5 +32,5 @@ ```javascript | ||
var expectedNode = document.createElement("div"); | ||
expectedHTML = "<span style='background: red; display: none' class='some-class'>"; | ||
expectedHTML = "<div style='background: red; display: none' class='some-class'>"; | ||
expectedHTML += "<span>Bob</span>"; | ||
expectedHTML += "</span>"; | ||
expectedHTML += "</div>"; | ||
expectedNode.innerHTML = expectedHTML; | ||
@@ -44,5 +44,5 @@ expect(dom.isNodeEqual(expectedNode)).toBeTruthy(); | ||
var dom = document.getElementById("testElement"); | ||
var expectedHTML = "<span style='background: red; display: none' class='some-class'>"; | ||
var expectedHTML = "<div style='background: red; display: none' class='some-class'>"; | ||
expectedHTML += "<span>Bob</span>"; | ||
expectedHTML += "</span>"; | ||
expectedHTML += "</div>"; | ||
@@ -67,3 +67,5 @@ expect(dom.outerHTML).toEqual(expectedHTML); | ||
var dom = document.getElementById("testElement"); | ||
var expectedHTML = "<span style='display: none' class='some-class'><span>Bob</span></span>"; | ||
var expectedHTML = "<div style='display: none' class='some-class'>"; | ||
expectedHTML += "<span>Bob</span>"; | ||
expectedHTML += "</div>"; | ||
@@ -86,5 +88,5 @@ var actual = normalizer.domNode(dom); //method to normalize a DOM node | ||
var expectedHTML = ( | ||
<span style={{display: none}} className='some-class'> | ||
<div style={{display: none}} className='some-class'> | ||
<span>Bob</span> | ||
</span> | ||
</div> | ||
); | ||
@@ -91,0 +93,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32189
146