CodeVetter · Repo Unpack · Testing signals
chromaui/chromatic-cli
Tests and CI were inspected, not executed; their existence establishes intended checks, not passing results. Vitest covers task logic, orchestration, renderer semantics, and deterministic hashing through extensive mocks and fixtures. CI also defines packed-package smoke runs and hosted visual checks, which exercise different boundaries from unit tests. This is a bounded inspection, and configured coverage excludes the Action adapter and several presentation/fixture categories.
- package.json defines vitest run --coverage; vitest.config.mts includes bin-src, node-src, and isChromatic helpers in coverage, excluding stories, frames, fake adapters, mocks, and selected test utilities. action-src is outside that configured coverage include.
- node-src/index.test.ts mocks subprocesses, DNS, node-fetch, and writes; its orchestration assertions include merge-base checkout before getCommit and restoration after a later failure, so those tests do not demonstrate real Git restoration.
- upload.test.ts checks GraphQL descriptors, multipart target uploads, and upload tallies with mocked HTTP/files; its fallback test asserts a second mutation omits contentHash after a sentinel failure.
- share.test.ts mocks reservation, confirmation, file upload, and filesystem boundaries; assertions cover early onUrl delivery, complete/error/cancelled confirmation, nonfatal confirmation errors, and optional log-file configuration.
- Renderer-engine tests distinguish skip from skip-self: both succeed visually, but only skip sets ctx.skip; these assertions protect downstream pipeline behavior independently of a terminal renderer.
- manifest.golden.test.ts pins exact whole-Storybook, per-story, and config hashes against a frozen fixture, supplementing relational hash tests; its comments explain that changing the recipe affects comparisons against older baseline hashes.
- smoke-test.yml packs the CLI and defines Yarn variants, pnpm, npx, Node API, Windows, and Action runs; it copies fixtures outside the repository to avoid fallback to repository node_modules. The inspected matrix lists Ubuntu and Windows, without establishing macOS behavior.
- Lint-and-test CI specifies type checking, linting, build inspection, Vitest, and Codecov; separate Chromatic workflows publish the CLI's own Storybook with exitOnceUploaded:true, so their upload job does not wait for final snapshot results.