We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e93ab66 commit d7513efCopy full SHA for d7513ef
git/git_test.go
@@ -3,7 +3,7 @@ package git
3
import (
4
"fmt"
5
"os"
6
- "strings"
+ "regexp"
7
"testing"
8
9
"github.com/github/gh-cli/test"
@@ -51,7 +51,8 @@ func Test_UncommittedChangeCount(t *testing.T) {
51
52
GitCommand = test.StubExecCommand("TestGitStatusHelperProcess", "boom")
53
_, err := UncommittedChangeCount()
54
- if !strings.HasSuffix(err.Error(), "git.test: exit status 1") {
+ errorRE := regexp.MustCompile(`git\.test(\.exe)?: exit status 1$`)
55
+ if !errorRE.MatchString(err.Error()) {
56
t.Errorf("got unexpected error message: %s", err)
57
}
58
0 commit comments