TestNewRuntimeContext creates a RuntimeContext for testing purposes. Only Cmd and Config are set; other fields (Factory, larkSDK, etc.) are nil.
(cmd *cobra.Command, cfg *core.CliConfig)
| 16 | // TestNewRuntimeContext creates a RuntimeContext for testing purposes. |
| 17 | // Only Cmd and Config are set; other fields (Factory, larkSDK, etc.) are nil. |
| 18 | func TestNewRuntimeContext(cmd *cobra.Command, cfg *core.CliConfig) *RuntimeContext { |
| 19 | return &RuntimeContext{Cmd: cmd, Config: cfg} |
| 20 | } |
| 21 | |
| 22 | // TestNewRuntimeContextWithCtx creates a RuntimeContext with an explicit context |
| 23 | // for tests that invoke functions which call Ctx() (e.g. HTTP request helpers). |
no outgoing calls
no test coverage detected