Files
openclaw/test/scripts/check-docs-i18n-glossary.test.ts
Peter Steinberger 7bf80dc2c6 chore(tooling): enforce formatting and refresh TypeScript checks (#104239)
* chore(tooling): enforce current formatter and refresh checks

* chore(tooling): keep release changelog formatter-owned

* chore(tooling): retain compatible Node type surface

* ci: enforce formatting for docs-only changes

* ci: isolate docs formatter check

* chore(tooling): apply updated lint and format rules

* chore(tooling): satisfy updated switch lint

* style(ui): apply Linux formatter layout

* test(doctor): match quiet local audio contribution

* test(doctor): assert quiet output only

* test(doctor): follow restored information contract
2026-07-11 01:09:51 -07:00

20 lines
836 B
TypeScript

import { describe, expect, it } from "vitest";
import { parseArgs } from "../../scripts/check-docs-i18n-glossary.mjs";
describe("check-docs-i18n-glossary", () => {
it("parses explicit diff refs", () => {
expect(parseArgs(["--base", "origin/main", "--head", "HEAD"])).toEqual({
base: "origin/main",
head: "HEAD",
});
});
it("rejects missing diff ref values", () => {
expect(() => parseArgs(["--base", "--head", "HEAD"])).toThrow("--base requires a value");
expect(() => parseArgs(["--base", "-h", "--head", "HEAD"])).toThrow("--base requires a value");
expect(() => parseArgs(["--head"])).toThrow("--head requires a value");
expect(() => parseArgs(["--head", "-h"])).toThrow("--head requires a value");
expect(() => parseArgs(["--base", ""])).toThrow("--base requires a value");
});
});