Home / Function/ setup() — astro Function Reference

setup() — astro Function Reference

Architecture documentation for the setup() function in setup.js from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  a8a34dd7_5db0_ef9a_4132_655d1b440674["setup()"]
  c8724ab3_49cd_5062_97d7_92c15bdcfb69["setup.js"]
  a8a34dd7_5db0_ef9a_4132_655d1b440674 -->|defined in| c8724ab3_49cd_5062_97d7_92c15bdcfb69
  059d6180_e8b9_fe3d_9d0c_6c7c63b89996["cli()"]
  a8a34dd7_5db0_ef9a_4132_655d1b440674 -->|calls| 059d6180_e8b9_fe3d_9d0c_6c7c63b89996
  style a8a34dd7_5db0_ef9a_4132_655d1b440674 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/language-tools/language-server/test/setup.js lines 12–21

export default async function setup() {
	// We only run the tests that require sync on Node.js versions other than 20 because the language server supports
	// a lower minimum version than Astro itself due to our lowest supported VS Code version, which mean we can't run Astro
	if (parseInt(process.versions.node) !== 20) {
		const res = await cli('sync', '--root', fixtureDir).getResult();
		if (res.exitCode !== 0) {
			throw new Error(res.stderr);
		}
	}
}

Domain

Subdomains

Calls

Frequently Asked Questions

What does setup() do?
setup() is a function in the astro codebase, defined in packages/language-tools/language-server/test/setup.js.
Where is setup() defined?
setup() is defined in packages/language-tools/language-server/test/setup.js at line 12.
What does setup() call?
setup() calls 1 function(s): cli.

Analyze Your Own Codebase

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

Try Supermodel Free