Home / Function/ runInContainer() — astro Function Reference

runInContainer() — astro Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  f09af995_6d60_a9f3_bdf0_6ae561f198cb["runInContainer()"]
  b0be4d0c_86b6_a283_f2af_003189bfd572["test-utils.js"]
  f09af995_6d60_a9f3_bdf0_6ae561f198cb -->|defined in| b0be4d0c_86b6_a283_f2af_003189bfd572
  16e9d20a_70fc_8349_984c_4af9e0b840d5["createBasicSettings()"]
  f09af995_6d60_a9f3_bdf0_6ae561f198cb -->|calls| 16e9d20a_70fc_8349_984c_4af9e0b840d5
  style f09af995_6d60_a9f3_bdf0_6ae561f198cb fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/test/units/test-utils.js lines 152–165

export async function runInContainer(options = {}, callback) {
	const settings = await createBasicSettings(options.inlineConfig ?? {});
	const container = await createContainer({
		fs: options?.fs ?? realFS,
		settings,
		inlineConfig: options.inlineConfig ?? {},
		logger: defaultLogger,
	});
	try {
		await callback(container);
	} finally {
		await container.close();
	}
}

Subdomains

Frequently Asked Questions

What does runInContainer() do?
runInContainer() is a function in the astro codebase, defined in packages/astro/test/units/test-utils.js.
Where is runInContainer() defined?
runInContainer() is defined in packages/astro/test/units/test-utils.js at line 152.
What does runInContainer() call?
runInContainer() calls 1 function(s): createBasicSettings.

Analyze Your Own Codebase

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

Try Supermodel Free