assertRouteRelations() — astro Function Reference
Architecture documentation for the assertRouteRelations() function in manifest.test.js from the astro codebase.
Entity Profile
Dependency Diagram
graph TD 9491d8f1_d0a0_7d63_2fe7_82e9fc8fa5ae["assertRouteRelations()"] 448a9a48_23e5_03c6_511e_437b2e8b7eda["manifest.test.js"] 9491d8f1_d0a0_7d63_2fe7_82e9fc8fa5ae -->|defined in| 448a9a48_23e5_03c6_511e_437b2e8b7eda style 9491d8f1_d0a0_7d63_2fe7_82e9fc8fa5ae fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/astro/test/units/routing/manifest.test.js lines 26–37
function assertRouteRelations(routes, relations) {
const routePaths = routes.map((route) => route.route);
for (const [before, after] of relations) {
const beforeIndex = routePaths.indexOf(before);
const afterIndex = routePaths.indexOf(after);
if (beforeIndex > afterIndex) {
assert.fail(`${before} should be higher priority than ${after}`);
}
}
}
Domain
Subdomains
Source
Frequently Asked Questions
What does assertRouteRelations() do?
assertRouteRelations() is a function in the astro codebase, defined in packages/astro/test/units/routing/manifest.test.js.
Where is assertRouteRelations() defined?
assertRouteRelations() is defined in packages/astro/test/units/routing/manifest.test.js at line 26.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free