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

astro.test.js — astro Source File

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

Entity Profile

Dependency Diagram

graph LR
  faf0627c_6a4e_d6d5_42d8_ca33cdd213a4["astro.test.js"]
  302610c5_2725_9f1a_b450_0bfcfb3b2d40["../dist/index.js"]
  faf0627c_6a4e_d6d5_42d8_ca33cdd213a4 --> 302610c5_2725_9f1a_b450_0bfcfb3b2d40
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  faf0627c_6a4e_d6d5_42d8_ca33cdd213a4 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  faf0627c_6a4e_d6d5_42d8_ca33cdd213a4 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style faf0627c_6a4e_d6d5_42d8_ca33cdd213a4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import * as assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { createRedirectsFromAstroRoutes } from '../dist/index.js';

describe('Astro', () => {
	it('Creates a Redirects object from routes', () => {
		const routeToDynamicTargetMap = new Map(
			Array.from([
				[{ pattern: '/', pathname: '/', segments: [] }, './.adapter/dist/entry.mjs'],
				[{ pattern: '/one', pathname: '/one', segments: [] }, './.adapter/dist/entry.mjs'],
			]),
		);
		const _redirects = createRedirectsFromAstroRoutes({
			config: {
				build: { format: 'directory' },
			},
			routeToDynamicTargetMap,
			dir: new URL(import.meta.url),
			buildOutput: 'server',
			assets: new Map([
				['/', new URL('./index.html', import.meta.url)],
				['/one', new URL('./one/index.html', import.meta.url)],
			]),
		});

		assert.equal(_redirects.definitions.length, 2);
	});
});

Domain

Dependencies

  • ../dist/index.js
  • node:test
  • strict

Frequently Asked Questions

What does astro.test.js do?
astro.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain.
What does astro.test.js depend on?
astro.test.js imports 3 module(s): ../dist/index.js, node:test, strict.
Where is astro.test.js in the architecture?
astro.test.js is located at packages/underscore-redirects/test/astro.test.js (domain: CoreAstro, directory: packages/underscore-redirects/test).

Analyze Your Own Codebase

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

Try Supermodel Free