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

Function TestClientWorktreeRemove

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

Source from the content-addressed store, hash-verified

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