| 1 | import assert from "node:assert/strict"; |
| 2 | import { readFileSync } from "node:fs"; |
| 3 | import { fileURLToPath } from "node:url"; |
| 4 | |
| 5 | const source = (relative: string) => readFileSync(fileURLToPath(new URL(relative, import.meta.url)), "utf8"); |
| 6 | const treeSource = source("../components/ProjectTree.tsx"); |
| 7 | const topicSource = source("../lib/projectTreeTopic.ts"); |
| 8 | const styles = source("../styles.css"); |
| 9 | |
| 10 | assert.ok(!treeSource.includes("projectTreeTopicRecoveryCopyCount"), "project tree ignores deprecated recovery-copy counts"); |
| 11 | assert.ok(!treeSource.includes("project-tree__topic-recovery-copies"), "project tree renders no recovery-copy badge"); |
| 12 | assert.ok(!topicSource.includes("projectTreeTopicRecoveryCopyCount"), "badge count helper is removed from the ordinary UI contract"); |
| 13 | assert.ok(!styles.includes(".project-tree__topic-recovery-copies"), "obsolete recovery-copy badge recipe is removed"); |
| 14 | |
| 15 | console.log(" PASS project tree keeps physical recovery copies private"); |
| 16 |