renderSimpleChecks() — astro Function Reference
Architecture documentation for the renderSimpleChecks() function in render-html.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 8ee96312_b151_6c0c_f899_770ab3cb800f["renderSimpleChecks()"] fd390267_3583_702c_81b1_1b4c55b1ead2["render-html.test.js"] 8ee96312_b151_6c0c_f899_770ab3cb800f -->|defined in| fd390267_3583_702c_81b1_1b4c55b1ead2 style 8ee96312_b151_6c0c_f899_770ab3cb800f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/test/render-html.test.js lines 104–131
function renderSimpleChecks(html) {
const { document } = parseHTML(html);
const h2 = document.querySelector('h2');
assert.equal(h2.textContent, 'Simple post header');
const spanInsideH2 = document.querySelector('h2 > span');
assert.equal(spanInsideH2.textContent, 'post');
assert.equal(spanInsideH2.className, 'inside-h2');
assert.equal(spanInsideH2.style.color, 'fuscia');
const p1 = document.querySelector('article > p:nth-of-type(1)');
assert.equal(p1.children.length, 1);
assert.equal(p1.textContent, 'This is a simple Markdoc post.');
const p2 = document.querySelector('article > p:nth-of-type(2)');
assert.equal(p2.children.length, 0);
assert.equal(p2.textContent, 'This is a paragraph!');
const p3 = document.querySelector('article > p:nth-of-type(3)');
assert.equal(p3.children.length, 1);
assert.equal(p3.textContent, 'This is a span inside a paragraph!');
const video = document.querySelector('video');
assert.ok(video, 'A video element should exist');
assert.ok(video.hasAttribute('autoplay'), 'The video element should have the autoplay attribute');
assert.ok(video.hasAttribute('muted'), 'The video element should have the muted attribute');
}
Domain
Subdomains
Source
Frequently Asked Questions
What does renderSimpleChecks() do?
renderSimpleChecks() is a function in the astro codebase, defined in packages/integrations/markdoc/test/render-html.test.js.
Where is renderSimpleChecks() defined?
renderSimpleChecks() is defined in packages/integrations/markdoc/test/render-html.test.js at line 104.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free