UI Evidence Argument Parser (lib/ui-evidence-args.js)

commonly · scripts/lib/ui-evidence-args.js · javascript · Apache-2.0
cli, dev-tools, testing

Parses command-line arguments for UI evidence screenshot generation scripts without browser dependencies. Use for testing CLI tools.

// Source: https://github.com/Team-Commonly/commonly | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * Argument parsing for `scripts/ui-evidence-shot.mjs`.
 *
 * Split out of the harness so the argument contract has a witness that needs no
 * browser: this module imports nothing, so a unit test can call it directly while
 * the script itself pulls Playwright in.
 *
 * Four refusals here exist because the harness once did the silent thing instead:
 *
 * - a flag the script did not implement was dropped, so `--width 390` produced a
 *   1440x900 capture under a `-390` name and the reviewer had no way to tell
 *   (2026-09-19, review-checklist rule 27);
 * - a value that belonge

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key