Skip to content

Commit

Permalink
Add a note about the style of git tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mislav committed Feb 26, 2021
1 parent d97e8fe commit 492f454
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions git/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func TestCommitBody(t *testing.T) {
}
}

/*
NOTE: below this are stubbed git tests, i.e. those that do not actually invoke `git`. If possible, utilize
`setGitDir()` to allow new tests to interact with `git`. For write operations, you can use `t.TempDir()` to
host a temporary git repository that is safe to be changed.
*/

func Test_UncommittedChangeCount(t *testing.T) {
type c struct {
Label string
Expand Down

0 comments on commit 492f454

Please sign in to comment.