Home / File/ dynamic-path.test.js — astro Source File

dynamic-path.test.js — astro Source File

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

Entity Profile

Dependency Diagram

graph LR
  0489ad94_db6a_2983_5fa0_d35836e391f1["dynamic-path.test.js"]
  4b1e6526_afae_1cc3_9eb4_67fe4c476b26["test-utils.js"]
  0489ad94_db6a_2983_5fa0_d35836e391f1 --> 4b1e6526_afae_1cc3_9eb4_67fe4c476b26
  5ab044f2_ed09_99b6_2b30_c55f0f9a239c["loadFixture"]
  0489ad94_db6a_2983_5fa0_d35836e391f1 --> 5ab044f2_ed09_99b6_2b30_c55f0f9a239c
  b2ff3d1c_3baf_6707_d502_0f4b2a220a11["readXML"]
  0489ad94_db6a_2983_5fa0_d35836e391f1 --> b2ff3d1c_3baf_6707_d502_0f4b2a220a11
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  0489ad94_db6a_2983_5fa0_d35836e391f1 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  0489ad94_db6a_2983_5fa0_d35836e391f1 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  style 0489ad94_db6a_2983_5fa0_d35836e391f1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import assert from 'node:assert/strict';
import { before, describe, it } from 'node:test';
import { loadFixture, readXML } from './test-utils.js';

describe('Dynamic with rest parameter', () => {
	/** @type {import('./test-utils.js').Fixture} */
	let fixture;

	before(async () => {
		fixture = await loadFixture({
			root: './fixtures/dynamic',
		});
		await fixture.build();
	});

	it('Should generate correct urls', async () => {
		const data = await readXML(fixture.readFile('/sitemap-0.xml'));
		const urls = data.urlset.url.map((url) => url.loc[0]);

		assert.ok(urls.includes('http://example.com/'));
		assert.ok(urls.includes('http://example.com/blog/'));
		assert.ok(urls.includes('http://example.com/test/'));
	});
});

Domain

Dependencies

Frequently Asked Questions

What does dynamic-path.test.js do?
dynamic-path.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain.
What does dynamic-path.test.js depend on?
dynamic-path.test.js imports 5 module(s): loadFixture, node:test, readXML, strict, test-utils.js.
Where is dynamic-path.test.js in the architecture?
dynamic-path.test.js is located at packages/integrations/sitemap/test/dynamic-path.test.js (domain: CoreAstro, directory: packages/integrations/sitemap/test).

Analyze Your Own Codebase

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

Try Supermodel Free