mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-12 21:53:00 -06:00
c70aee247e
* refactor(scripts): migrate JavaScript tools to TypeScript * fix(ci): keep changed-scope preflight zero-install * fix(ci): preserve zero-install script owners * fix(ci): complete script migration follow-through * fix(release): keep stable closeout zero-install * fix(scripts): preserve standalone execution boundaries * fix(scripts): repair standalone loader boundaries * fix(scripts): normalize gateway observation ids * fix(scripts): keep Docker packager standalone * test(scripts): preserve rebase cleanup helpers * test(sessions): use tracked temp directory
20 lines
836 B
TypeScript
20 lines
836 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { parseArgs } from "../../scripts/check-docs-i18n-glossary.mts";
|
|
|
|
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");
|
|
});
|
|
});
|