MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / TestGetRepositoryRoot_FromRepoRoot

Function TestGetRepositoryRoot_FromRepoRoot

vcs/git/git_test.go:65–75  ·  view source on GitHub ↗

Tests for GetRepositoryRoot

(t *testing.T)

Source from the content-addressed store, hash-verified

63// Tests for GetRepositoryRoot
64
65func TestGetRepositoryRoot_FromRepoRoot(t *testing.T) {
66 tmpDir := t.TempDir()
67 setupGitRepo(t, tmpDir)
68
69 root, err := GetRepositoryRoot(tmpDir)
70
71 require.NoError(t, err)
72 // Resolve symlinks for comparison (macOS /var -> /private/var)
73 resolvedTmp, _ := filepath.EvalSymlinks(tmpDir)
74 assert.Equal(t, resolvedTmp, root)
75}
76
77func TestGetRepositoryRoot_FromSubdirectory(t *testing.T) {
78 tmpDir := t.TempDir()

Callers

nothing calls this directly

Calls 2

setupGitRepoFunction · 0.85
GetRepositoryRootFunction · 0.85

Tested by

no test coverage detected