Home / Function/ fetchHTML() — astro Function Reference

fetchHTML() — astro Function Reference

Architecture documentation for the fetchHTML() function in ssr-script.test.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  c3d18d1b_cbe5_289f_fb25_7f256e10b75c["fetchHTML()"]
  80307b9d_fcb1_e6b2_e30b_5d74e2d07c06["ssr-script.test.js"]
  c3d18d1b_cbe5_289f_fb25_7f256e10b75c -->|defined in| 80307b9d_fcb1_e6b2_e30b_5d74e2d07c06
  style c3d18d1b_cbe5_289f_fb25_7f256e10b75c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/ssr-script.test.js lines 7–13

async function fetchHTML(fixture, path) {
	const app = await fixture.loadTestAdapterApp();
	const request = new Request('http://example.com' + path);
	const response = await app.render(request);
	const html = await response.text();
	return html;
}

Subdomains

Frequently Asked Questions

What does fetchHTML() do?
fetchHTML() is a function in the astro codebase, defined in packages/astro/test/ssr-script.test.js.
Where is fetchHTML() defined?
fetchHTML() is defined in packages/astro/test/ssr-script.test.js at line 7.

Analyze Your Own Codebase

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

Try Supermodel Free