template-processing.test.js — astro Source File
Architecture documentation for template-processing.test.js, a javascript file in the astro codebase. 3 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 724d862d_2889_25be_59d3_eabdf1f448e8["template-processing.test.js"] 880e345d_e64a_cd56_e5a1_121b9c58fefd["../dist/index.js"] 724d862d_2889_25be_59d3_eabdf1f448e8 --> 880e345d_e64a_cd56_e5a1_121b9c58fefd e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607["strict"] 724d862d_2889_25be_59d3_eabdf1f448e8 --> e1e2fac7_5a95_7a88_cb1e_0a3b91c4e607 6b0635f9_51ea_77aa_767b_7857878e98a6["node:test"] 724d862d_2889_25be_59d3_eabdf1f448e8 --> 6b0635f9_51ea_77aa_767b_7857878e98a6 style 724d862d_2889_25be_59d3_eabdf1f448e8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import assert from 'node:assert/strict';
import { describe, it } from 'node:test';
import { processTemplateReadme, removeTemplateMarkerSections } from '../dist/index.js';
describe('removeTemplateMarkerSections', async () => {
it('removes HTML template marker sections', async () => {
const content = `# Title
Keep this content.
<!-- ASTRO:REMOVE:START -->
Remove this section.
It spans multiple lines.
<!-- ASTRO:REMOVE:END -->
Keep this too.`;
const expected = `# Title
Keep this content.
Keep this too.`;
const result = removeTemplateMarkerSections(content);
assert.equal(result.trim(), expected.trim());
});
it('removes multiple HTML template marker sections', async () => {
const content = `# Title
<!-- ASTRO:REMOVE:START -->
First section to remove.
<!-- ASTRO:REMOVE:END -->
Keep this content.
<!-- ASTRO:REMOVE:START -->
Second section to remove.
<!-- ASTRO:REMOVE:END -->
Final content.`;
const expected = `# Title
Keep this content.
Final content.`;
const result = removeTemplateMarkerSections(content);
assert.equal(result.trim(), expected.trim());
});
it('handles whitespace in template marker tags', async () => {
const content = `# Title
<!-- ASTRO:REMOVE:START -->
Remove this content.
<!-- ASTRO:REMOVE:END -->
Keep this.`;
// ... (299 more lines)
Domain
Dependencies
- ../dist/index.js
- node:test
- strict
Source
Frequently Asked Questions
What does template-processing.test.js do?
template-processing.test.js is a source file in the astro codebase, written in javascript. It belongs to the CoreAstro domain.
What does template-processing.test.js depend on?
template-processing.test.js imports 3 module(s): ../dist/index.js, node:test, strict.
Where is template-processing.test.js in the architecture?
template-processing.test.js is located at packages/create-astro/test/template-processing.test.js (domain: CoreAstro, directory: packages/create-astro/test).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free