Home / Function/ loadFixture() — astro Function Reference

loadFixture() — astro Function Reference

Architecture documentation for the loadFixture() function in test-utils.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  95df8b4a_03a9_ecbd_280c_bf8530b728ba["loadFixture()"]
  1c3a6eaf_e190_a7a7_4e0d_f3970df5bd14["test-utils.js"]
  95df8b4a_03a9_ecbd_280c_bf8530b728ba -->|defined in| 1c3a6eaf_e190_a7a7_4e0d_f3970df5bd14
  dd4f09ce_3fd7_8295_f616_8876cda4555c["loadFixture()"]
  95df8b4a_03a9_ecbd_280c_bf8530b728ba -->|calls| dd4f09ce_3fd7_8295_f616_8876cda4555c
  style 95df8b4a_03a9_ecbd_280c_bf8530b728ba fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/vue/test/test-utils.js lines 7–16

export function loadFixture(inlineConfig) {
	if (!inlineConfig?.root) throw new Error("Must provide { root: './fixtures/...' }");

	// resolve the relative root (i.e. "./fixtures/tailwindcss") to a full filepath
	// without this, the main `loadFixture` helper will resolve relative to `packages/astro/test`
	return baseLoadFixture({
		...inlineConfig,
		root: new URL(inlineConfig.root, import.meta.url).toString(),
	});
}

Domain

Subdomains

Frequently Asked Questions

What does loadFixture() do?
loadFixture() is a function in the astro codebase, defined in packages/integrations/vue/test/test-utils.js.
Where is loadFixture() defined?
loadFixture() is defined in packages/integrations/vue/test/test-utils.js at line 7.
What does loadFixture() call?
loadFixture() calls 1 function(s): loadFixture.

Analyze Your Own Codebase

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

Try Supermodel Free