MCPcopy Create free account
hub / github.com/github/gh-aw / TestFindGitRootForPath

Function TestFindGitRootForPath

pkg/cli/git_helpers_test.go:91–105  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

89}
90
91func TestFindGitRootForPath(t *testing.T) {
92 // Test with current file path
93 gitRoot, err := findGitRootForPath("git_helpers_test.go")
94 if err != nil {
95 // This is okay if we're not in a git repository
96 t.Logf("findGitRootForPath returned error: %v", err)
97 return
98 }
99
100 if gitRoot == "" {
101 t.Error("findGitRootForPath returned empty string without error")
102 } else {
103 t.Logf("Git root: %s", gitRoot)
104 }
105}
106
107func TestGetRepositorySlugFromRemoteForPath(t *testing.T) {
108 // Test with current file path

Callers

nothing calls this directly

Calls 2

findGitRootForPathFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected