MCPcopy Index your code
hub / github.com/larksuite/cli / TestSetTipsAndGetTips

Function TestSetTipsAndGetTips

internal/cmdutil/tips_test.go:12–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10)
11
12func TestSetTipsAndGetTips(t *testing.T) {
13 cmd := &cobra.Command{Use: "test"}
14 tips := []string{"tip one", "tip two"}
15 SetTips(cmd, tips)
16
17 got := GetTips(cmd)
18 if len(got) != 2 || got[0] != "tip one" || got[1] != "tip two" {
19 t.Fatalf("expected %v, got %v", tips, got)
20 }
21}
22
23func TestSetTipsEmpty(t *testing.T) {
24 cmd := &cobra.Command{Use: "test"}

Callers

nothing calls this directly

Calls 2

SetTipsFunction · 0.85
GetTipsFunction · 0.85

Tested by

no test coverage detected