Home / Function/ testFactory() — astro Function Reference

testFactory() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  acd4a219_f994_eae3_65f9_a97d2d3c7f3c["testFactory()"]
  6edce826_f6ba_1758_b163_54ce397ea33f["test-utils.js"]
  acd4a219_f994_eae3_65f9_a97d2d3c7f3c -->|defined in| 6edce826_f6ba_1758_b163_54ce397ea33f
  635fda1a_dabb_b7fb_8ae7_bd460a659a81["prepareTestFactory()"]
  635fda1a_dabb_b7fb_8ae7_bd460a659a81 -->|calls| acd4a219_f994_eae3_65f9_a97d2d3c7f3c
  5b5870e5_6570_8950_c56d_3170427d28c7["loadFixture()"]
  acd4a219_f994_eae3_65f9_a97d2d3c7f3c -->|calls| 5b5870e5_6570_8950_c56d_3170427d28c7
  style acd4a219_f994_eae3_65f9_a97d2d3c7f3c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/integrations/alpinejs/test/test-utils.js lines 31–46

function testFactory(inlineConfig) {
	let fixture;

	const test = testBase.extend({
		astro: async ({}, use) => {
			fixture = fixture || (await loadFixture(inlineConfig));
			await use(fixture);
		},
	});

	test.afterEach(() => {
		fixture.resetAllFiles();
	});

	return test;
}

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free