(t *testing.T)
| 35 | } |
| 36 | |
| 37 | func TestCreateWithName(t *testing.T) { |
| 38 | t.Parallel() |
| 39 | dir := bootstrapRepo(t) |
| 40 | root := t.TempDir() |
| 41 | |
| 42 | wt, err := Create(t.Context(), dir, "my-feature", WithRoot(root)) |
| 43 | require.NoError(t, err) |
| 44 | |
| 45 | assert.Equal(t, "my-feature", wt.Name) |
| 46 | assert.Equal(t, "worktree-my-feature", wt.Branch) |
| 47 | assert.Equal(t, filepath.Join(root, "worktrees", "my-feature"), wt.Dir) |
| 48 | assert.FileExists(t, filepath.Join(wt.Dir, "a.txt")) |
| 49 | } |
| 50 | |
| 51 | func TestCreateWithBaseBranchesFromRef(t *testing.T) { |
| 52 | t.Parallel() |
nothing calls this directly
no test coverage detected