mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-08 08:08:04 +00:00
## Summary Stop running the full Vitest suite twice in unit CI. The critical coverage gate is now a glob-keyed `coverage.thresholds` entry enforced during the single `pnpm test:coverage` run, instead of a second `COVERAGE_CRITICAL=true vitest run --coverage` pass. ## Changes - **What**: All critical directories form one brace-expanded glob key in `coverage.thresholds`; Vitest aggregates the matching files into a single bucket and checks the existing thresholds (69/60/67/70) against it during the normal coverage run. Untested files matching `coverage.include` are counted at 0%, preserving the previous gate's semantics. - **What**: Narrows the litegraph coverage exclusion from a blanket `src/lib/litegraph/**` to the non-critical subfolders, so the critical litegraph folders (`node`, `subgraph`, `utils`) are present in the coverage report the thresholds read. - **What**: Removes the `test:coverage:critical` script, the `COVERAGE_CRITICAL` env branch in `vite.config.mts`, and the separate CI gate step. ## Notes - The normal coverage report now includes the critical litegraph folders, so the Codecov `unit` flag and the coverage Slack baseline will show a one-time shift. - Filtered local runs (`pnpm test:coverage <file>`) fail the gate since most critical files are uncovered; a full `pnpm test:coverage` reproduces CI exactly. Validation: - `pnpm typecheck`, `pnpm exec eslint vite.config.mts`, `pnpm format:check`, `pnpm knip` (pre-push) - Smoke: `pnpm vitest run --coverage src/utils/colorUtil.test.ts` — tests pass, then the gate fails all four metrics against the critical bucket and exits 1, confirming enforcement happens inside the single run - Full-suite gate numbers should be confirmed in CI