assertCustomFenceRendered() — astro Function Reference
Architecture documentation for the assertCustomFenceRendered() function in render-with-transform.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 0b208c1e_8281_b582_caab_1c41404defe2["assertCustomFenceRendered()"] 59163531_94f3_de5d_5dab_8bb66604b424["render-with-transform.test.js"] 0b208c1e_8281_b582_caab_1c41404defe2 -->|defined in| 59163531_94f3_de5d_5dab_8bb66604b424 style 0b208c1e_8281_b582_caab_1c41404defe2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/integrations/markdoc/test/render-with-transform.test.js lines 51–69
function assertCustomFenceRendered(html) {
const { document } = parseHTML(html);
// The custom component should render a div with data-custom-fence
const customFence = document.querySelector('[data-custom-fence]');
assert.notEqual(
customFence,
null,
'Expected custom fence component to be rendered (div[data-custom-fence])',
);
// Verify it has the language attribute
assert.equal(customFence.getAttribute('data-language'), 'js', 'Expected data-language="js"');
// The content should be inside a pre > code
const code = customFence.querySelector('pre code');
assert.notEqual(code, null, 'Expected pre > code inside custom fence');
assert.ok(code.textContent.includes('hello'), 'Expected code content to include "hello"');
}
Domain
Subdomains
Source
Frequently Asked Questions
What does assertCustomFenceRendered() do?
assertCustomFenceRendered() is a function in the astro codebase, defined in packages/integrations/markdoc/test/render-with-transform.test.js.
Where is assertCustomFenceRendered() defined?
assertCustomFenceRendered() is defined in packages/integrations/markdoc/test/render-with-transform.test.js at line 51.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free