test(docs): align rewrite guards with current wording (#100183)

This commit is contained in:
Vincent Koc
2026-07-04 22:23:10 -07:00
committed by GitHub
parent 76d686cf61
commit 214ee02359
4 changed files with 6 additions and 4 deletions
-1
View File
@@ -15,7 +15,6 @@ const minimaxDoc = fs.readFileSync(path.join(repoRoot, "docs/providers/minimax.m
describe("MiniMax docs sync", () => {
it("keeps the live-testing guide on the current MiniMax default", () => {
expect(testingLiveDoc).toContain("MiniMax M3");
expect(testingLiveDoc).toContain(MINIMAX_DEFAULT_MODEL_REF);
});
+4 -1
View File
@@ -33,10 +33,13 @@ function readRepoFile(relativePath: string): string {
describe("talk silence timeout defaults", () => {
it("keeps help text and docs aligned with the policy", () => {
const defaultsDescription = describeTalkSilenceTimeoutDefaults();
const talkDocDefaults =
`\`${EXPECTED_TALK_SILENCE_TIMEOUT_MS_BY_PLATFORM.macos}\` ms macOS/Android, ` +
`\`${EXPECTED_TALK_SILENCE_TIMEOUT_MS_BY_PLATFORM.ios}\` ms iOS`;
expect(FIELD_HELP["talk.silenceTimeoutMs"]).toContain(defaultsDescription);
expect(readRepoFile("docs/gateway/config-agents.md")).toContain(defaultsDescription);
expect(readRepoFile("docs/nodes/talk.md")).toContain(defaultsDescription);
expect(readRepoFile("docs/nodes/talk.md")).toContain(talkDocDefaults);
});
it("matches the Apple and Android runtime constants", () => {
@@ -428,6 +428,6 @@ describe("resolveCronFallbacksOverride", () => {
const automationDocs = readFileSync("docs/automation/cron-jobs.md", "utf8");
expect(cliDocs).toContain("Local-provider preflight checks walk configured fallbacks");
expect(automationDocs).toContain("Local-provider preflight checks walk configured fallbacks");
expect(automationDocs).toContain("This preflight walks the job's configured fallback chain");
});
});
+1 -1
View File
@@ -20,7 +20,7 @@ describe("environment docs", () => {
expect(markdown).toContain("Provider credentials and workspace `.env`");
expect(markdown).toContain(
"OpenClaw ignores provider credential environment variables from workspace `.env` files",
"OpenClaw ignores provider credentials and protected runtime controls from workspace `.env`",
);
expect(markdown).toContain("~/.openclaw/.env");
expect(markdown).toContain("$OPENCLAW_STATE_DIR/.env");