Home / File/ routing-priority.test.js — astro Source File

routing-priority.test.js — astro Source File

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

File javascript CoreAstro RoutingSystem 5 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  e2b26754_1504_8a2a_b870_797c2ac24bd9["routing-priority.test.js"]
  635e1221_67bb_e784_624a_d6d63643872b["_test-utils.js"]
  e2b26754_1504_8a2a_b870_797c2ac24bd9 --> 635e1221_67bb_e784_624a_d6d63643872b
  33b9a01d_12ac_568f_9775_9e80b35139cb["loadFixture"]
  e2b26754_1504_8a2a_b870_797c2ac24bd9 --> 33b9a01d_12ac_568f_9775_9e80b35139cb
  e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"]
  e2b26754_1504_8a2a_b870_797c2ac24bd9 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607
  6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"]
  e2b26754_1504_8a2a_b870_797c2ac24bd9 --> 6b0635f9_51ea_77aa_767b_7857878e98a6
  deb87372_5629_35f8_9a54_e755a08f776a["cheerio"]
  e2b26754_1504_8a2a_b870_797c2ac24bd9 --> deb87372_5629_35f8_9a54_e755a08f776a
  style e2b26754_1504_8a2a_b870_797c2ac24bd9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import assert from 'node:assert/strict';
import { after, before, describe, it } from 'node:test';
import { load as cheerioLoad } from 'cheerio';
import { loadFixture } from './_test-utils.js';

const routes = [
	{
		description: 'matches / to index.astro',
		url: '/',
		h1: 'index.astro',
	},
	{
		description: 'matches /slug-1 to [slug].astro',
		url: '/slug-1',
		h1: '[slug].astro',
		p: 'slug-1',
	},
	{
		description: 'matches /slug-2 to [slug].astro',
		url: '/slug-2',
		h1: '[slug].astro',
		p: 'slug-2',
	},
	{
		description: 'matches /page-1 to [page].astro',
		url: '/page-1',
		h1: '[page].astro',
		p: 'page-1',
	},
	{
		description: 'matches /page-2 to [page].astro',
		url: '/page-2',
		h1: '[page].astro',
		p: 'page-2',
	},
	{
		description: 'matches /posts/post-1 to posts/[pid].astro',
		url: '/posts/post-1',
		h1: 'posts/[pid].astro',
		p: 'post-1',
	},
	{
		description: 'matches /posts/post-2 to posts/[pid].astro',
		url: '/posts/post-2',
		h1: 'posts/[pid].astro',
		p: 'post-2',
	},
	{
		description: 'matches /posts/1/2 to posts/[...slug].astro',
		url: '/posts/1/2',
		h1: 'posts/[...slug].astro',
		p: '1/2',
	},
	{
		description: 'matches /de to de/index.astro',
		url: '/de',
		h1: 'de/index.astro (priority)',
	},
	{
		description: 'matches /en to [lang]/index.astro',
// ... (211 more lines)

Domain

Subdomains

Dependencies

Frequently Asked Questions

What does routing-priority.test.js do?
routing-priority.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain, RoutingSystem subdomain.
What functions are defined in routing-priority.test.js?
routing-priority.test.js defines 1 function(s): appendForwardSlash.
What does routing-priority.test.js depend on?
routing-priority.test.js imports 5 module(s): _test-utils.js, cheerio, loadFixture, node:test, strict.
Where is routing-priority.test.js in the architecture?
routing-priority.test.js is located at packages/integrations/cloudflare/test/routing-priority.test.js (domain: CoreAstro, subdomain: RoutingSystem, directory: packages/integrations/cloudflare/test).

Analyze Your Own Codebase

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

Try Supermodel Free