renderNestedHTMLChecks() — astro Function Reference
Architecture documentation for the renderNestedHTMLChecks() function in render-html.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 57397e17_9678_c91c_3cda_b1e725feffd2["renderNestedHTMLChecks()"] fd390267_3583_702c_81b1_1b4c55b1ead2["render-html.test.js"] 57397e17_9678_c91c_3cda_b1e725feffd2 -->|defined in| fd390267_3583_702c_81b1_1b4c55b1ead2 style 57397e17_9678_c91c_3cda_b1e725feffd2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/test/render-html.test.js lines 134–179
function renderNestedHTMLChecks(html) {
const { document } = parseHTML(html);
const p1 = document.querySelector('p:nth-of-type(1)');
assert.equal(p1.id, 'p1');
assert.equal(p1.textContent, 'before inner after');
assert.equal(p1.children.length, 1);
const p1Span1 = p1.querySelector('span');
assert.equal(p1Span1.textContent, 'inner');
assert.equal(p1Span1.id, 'inner1');
assert.equal(p1Span1.className, 'inner-class');
assert.equal(p1Span1.style.color, 'hotpink');
const p2 = document.querySelector('p:nth-of-type(2)');
assert.equal(p2.id, 'p2');
assert.equal(p2.textContent, '\n before\n inner\n after\n');
assert.equal(p2.children.length, 1);
const divL1 = document.querySelector('div:nth-of-type(1)');
assert.equal(divL1.id, 'div-l1');
assert.equal(divL1.children.length, 2);
const divL2_1 = divL1.querySelector('div:nth-of-type(1)');
assert.equal(divL2_1.id, 'div-l2-1');
assert.equal(divL2_1.children.length, 1);
const p3 = divL2_1.querySelector('p:nth-of-type(1)');
assert.equal(p3.id, 'p3');
assert.equal(p3.textContent, 'before inner after');
assert.equal(p3.children.length, 1);
const divL2_2 = divL1.querySelector('div:nth-of-type(2)');
assert.equal(divL2_2.id, 'div-l2-2');
assert.equal(divL2_2.children.length, 2);
const p4 = divL2_2.querySelector('p:nth-of-type(1)');
assert.equal(p4.id, 'p4');
assert.equal(p4.textContent, 'before inner after');
assert.equal(p4.children.length, 1);
const p5 = divL2_2.querySelector('p:nth-of-type(2)');
assert.equal(p5.id, 'p5');
assert.equal(p5.textContent, 'before inner after');
assert.equal(p5.children.length, 1);
}
Domain
Subdomains
Source
Frequently Asked Questions
What does renderNestedHTMLChecks() do?
renderNestedHTMLChecks() is a function in the astro codebase, defined in packages/integrations/markdoc/test/render-html.test.js.
Where is renderNestedHTMLChecks() defined?
renderNestedHTMLChecks() is defined in packages/integrations/markdoc/test/render-html.test.js at line 134.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free