Home / File/ format.test.js — astro Source File

format.test.js — astro Source File

Architecture documentation for format.test.js, a javascript file in the astro codebase. 5 imports, 0 dependents.

Entity Profile

Dependency Diagram

graph LR
  5870f86b_6b22_49c5_2339_c5ed82276e03["format.test.js"]
  b0be4d0c_86b6_a283_f2af_003189bfd572["test-utils.js"]
  5870f86b_6b22_49c5_2339_c5ed82276e03 --> b0be4d0c_86b6_a283_f2af_003189bfd572
  f0937d94_cf30_e0fa_fbd5_135f8c876f70["createFixture"]
  5870f86b_6b22_49c5_2339_c5ed82276e03 --> f0937d94_cf30_e0fa_fbd5_135f8c876f70
  f09af995_6d60_a9f3_bdf0_6ae561f198cb["runInContainer"]
  5870f86b_6b22_49c5_2339_c5ed82276e03 --> f09af995_6d60_a9f3_bdf0_6ae561f198cb
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  5870f86b_6b22_49c5_2339_c5ed82276e03 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  5870f86b_6b22_49c5_2339_c5ed82276e03 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style 5870f86b_6b22_49c5_2339_c5ed82276e03 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { createFixture, runInContainer } from '../test-utils.js';

describe('Astro config formats', () => {
	it('An mjs config can import TypeScript modules', async () => {
		const fixture = await createFixture({
			'/src/pages/index.astro': ``,
			'/src/stuff.ts': `export default 'works';`,
			'/astro.config.mjs': `\
					import stuff from './src/stuff.ts';
					export default {}
				`,
		});

		await runInContainer({ inlineConfig: { root: fixture.path } }, () => {
			assert.equal(
				true,
				true,
				'We were able to get into the container which means the config loaded.',
			);
		});
	});
});

Dependencies

Frequently Asked Questions

What does format.test.js do?
format.test.js is a source file in the astro codebase, written in javascript. It belongs to the IntegrationAdapters domain.
What does format.test.js depend on?
format.test.js imports 5 module(s): createFixture, node:test, runInContainer, strict, test-utils.js.
Where is format.test.js in the architecture?
format.test.js is located at packages/astro/test/units/config/format.test.js (domain: IntegrationAdapters, directory: packages/astro/test/units/config).

Analyze Your Own Codebase

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

Try Supermodel Free