import { readFileSync } from "node:fs"; import { describe, expect, it } from "vitest"; import { RUNTIME_OVERRIDES } from "../../scripts/generate-runtime-config.ts"; // 13-15. README said runtime settings live in public/config.json, which the // build replaces with config/runtime/.json, and named none of the // variables a production build needs. describe("runtime configuration documentation", () => { it("names every build and deploy variable in the README", () => { const readme = readFileSync("README.md", "utf8"); for (const variable of [ "APP_PROFILE", "RELEASE_TARGET", "VITE_BUILD_ID", "RELEASE_ID", ...Object.values(RUNTIME_OVERRIDES), ]) { expect(readme, variable).toContain(`\`${variable}\``); } expect(readme).toContain("config/runtime/.json"); }); });