v1.1.6 - 2026-05-27
What's Changed
- refactor: Extracted
doCheck()fromrunCheck()so the core "check" logic is independently unit-testable and no longer callsos.Exitdirectly. - fix: Removed unnecessary defensive
cfg != nilchecks inrunCheck(). - fix:
mockUsagesJSONnow panics on marshal errors instead of silently discarding them. - chore: Added
cover.outto.gitignore. - test: Direct unit tests for
gradientGreenToRed,renderProgressBar,buildCapabilityTable,isTaggedVersion,isForceRefresh,isValidSubscription,doCheck. - test: Comprehensive failure-scenario tests for
config(corrupted JSON, JWT edge cases, dir errors, Rename failure) andcache(corrupted data, invalid timestamps, permission-denied, write failure, path errors). - test:
i18npackage 100% coverage (lookup fallback chainzh_HK→zh, direct catalog access). - test: Covered all-expired balance fallback in
selectPrimaryBalanceand invalid end-time parse inbuildSubscriptionBox. - test: Fixed false-positive
TestDoCheck_NewClientError(Logf→Errorf). - test: Tightened
TestCLIVersionto verifydev*/v*format. - test: Tightened
TestDoCheck_WithProgressto assert specific99%value from mock data. - test: Extended ASCII capability table test to verify content, not just borders.
Coverage: 73.3% → 82.4%