(projectRoot)
| 105 | } |
| 106 | |
| 107 | function 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. |
| 122 | function diffTexts(name, expected, actual) { |
no test coverage detected