mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-15 11:06:04 +00:00
* 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
20 lines
836 B
TypeScript
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");
|
|
});
|
|
});
|