Home / Function/ renderComponentsChecks() — astro Function Reference

renderComponentsChecks() — astro Function Reference

Architecture documentation for the renderComponentsChecks() function in content-layer-markdoc.test.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  e11d1261_18b6_dfa8_1002_7b58fef10b4d["renderComponentsChecks()"]
  8e29a2a9_40ff_467d_7a86_8a7899e36993["content-layer-markdoc.test.js"]
  e11d1261_18b6_dfa8_1002_7b58fef10b4d -->|defined in| 8e29a2a9_40ff_467d_7a86_8a7899e36993
  style e11d1261_18b6_dfa8_1002_7b58fef10b4d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/content-layer-markdoc.test.js lines 61–76

function renderComponentsChecks(html) {
	const $ = cheerio.load(html);
	const h2 = $('h2');
	assert.equal(h2.text(), 'Post with components');

	// Renders custom shortcode component
	const marquee = $('marquee');
	assert.notEqual(marquee, null);
	assert.equal(marquee.attr('data-custom-marquee'), '');

	// Renders Astro Code component
	const pre = $('pre');
	assert.notEqual(pre, null);
	assert.ok(pre.hasClass('github-dark'));
	assert.ok(pre.hasClass('astro-code'));
}

Subdomains

Frequently Asked Questions

What does renderComponentsChecks() do?
renderComponentsChecks() is a function in the astro codebase, defined in packages/astro/test/content-layer-markdoc.test.js.
Where is renderComponentsChecks() defined?
renderComponentsChecks() is defined in packages/astro/test/content-layer-markdoc.test.js at line 61.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free