Files
PolyWeather/frontend/components/dashboard/scan-terminal/__tests__/mobileAnnouncement.test.ts
T

25 lines
645 B
TypeScript

import fs from "node:fs";
import path from "node:path";
function assert(condition: unknown, message: string) {
if (!condition) throw new Error(message);
}
export function runTests() {
const projectRoot = process.cwd();
const dashboardPath = path.join(
projectRoot,
"components",
"dashboard",
"ScanTerminalDashboard.tsx",
);
const source = fs.readFileSync(dashboardPath, "utf8");
assert(
source.includes("CityRegionList") &&
source.includes("decisionLabel") &&
!source.includes("showAnnouncement"),
"v1.5.6 scan upgrade announcement must be removed; new terminal layout must be present",
);
}