mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
cf2ecb0e0a
Three gaps raised in review, all cases where a test would still pass after the implementation it covers was reverted: The write-level --yes branch of RiskLine had no direct unit test. The tree-wide invariant in package cmd reaches it only through the shortcuts that happen to have that shape today, so the contract was asserted by coincidence rather than by construction. Add a case that registers --yes at write level and pins all three properties: the ban is present, the wording is scoped to the gated step, and the high-risk-write phrasing is absent (claiming the whole command is gated would be false there). Verified by restoring the old level-keyed condition, which fails this test. TestPrepareShortcutHelp asserted that overlay tips land on the command but not that they leave Long. Rendering them in both places -- the exact defect this branch removes -- would have passed. Assert the absence too. TestPrepareMethodHelp built a factory without isolating the config dir, against the convention used by 114 test files in this repo including cmd/service/service_paginate_test.go. Point it at t.TempDir().