MCPcopy Create free account
hub / github.com/SethGammon/Citadel / expectedSurfaces

Function expectedSurfaces

scripts/generate-doc-surfaces.js:107–119  ·  view source on GitHub ↗
(projectRoot)

Source from the content-addressed store, hash-verified

105}
106
107function expectedSurfaces(projectRoot) {
108 const counts = computeCounts(projectRoot);
109 const surfaces = surfaceSpecs(projectRoot).map((spec) => {
110 const actual = fs.readFileSync(spec.filePath, 'utf8');
111 return {
112 name: spec.name,
113 filePath: spec.filePath,
114 actual,
115 expected: renderSurface(actual, counts, spec.name, spec.required),
116 };
117 });
118 return { counts, surfaces };
119}
120
121// Pure comparison: returns null when in sync, otherwise a drift descriptor.
122function diffTexts(name, expected, actual) {

Callers 2

checkProjectFunction · 0.70
generateFunction · 0.70

Calls 3

computeCountsFunction · 0.85
surfaceSpecsFunction · 0.85
renderSurfaceFunction · 0.85

Tested by

no test coverage detected