MCPcopy Create free account
hub / github.com/cli/cli / TestClientWorktreeRemove

Function TestClientWorktreeRemove

git/client_test.go:2396–2407  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2394}
2395
2396func TestClientWorktreeRemove(t *testing.T) {
2397 cmd, cmdCtx := createCommandContext(t, 0, "", "")
2398 client := Client{
2399 GitPath: "path/to/git",
2400 commandContext: cmdCtx,
2401 }
2402
2403 err := client.WorktreeRemove(context.Background(), "-feature")
2404
2405 require.NoError(t, err)
2406 assert.Equal(t, "path/to/git worktree remove -- -feature", strings.Join(cmd.Args[3:], " "))
2407}
2408
2409func TestClientWorktreePrune(t *testing.T) {
2410 cmd, cmdCtx := createCommandContext(t, 0, "", "")

Callers

nothing calls this directly

Calls 4

WorktreeRemoveMethod · 0.95
createCommandContextFunction · 0.85
EqualMethod · 0.80
JoinMethod · 0.80

Tested by

no test coverage detected