Skip to content

Commit 9627085

Browse files
CopilotJoannaaKL
andcommitted
tweak testmock path matching edge case
Co-authored-by: JoannaaKL <67866556+JoannaaKL@users.noreply.github.com>
1 parent eb9480e commit 9627085

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/github/testmock/testmock.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ func splitKey(k string) (method, pattern string, ok bool) {
134134
}
135135

136136
func matchPath(pattern, path string) bool {
137+
if pattern == "" {
138+
return path == ""
139+
}
140+
137141
if pattern == path {
138142
return true
139143
}

0 commit comments

Comments
 (0)