summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2021-04-06 15:20:36 +1000
committerJesse Duffield <jessedduffield@gmail.com>2021-04-06 19:34:32 +1000
commitfb9b6314a0439999079a511d83427744de973f60 (patch)
tree9eb1f59a1a38d69bfefc59e1cbee26dcfdb62c19 /test
parent0719a3e36e530ebc6716538ef4581d1929df8ab9 (diff)
ensure we're passing the right testing struct pointer around
Diffstat (limited to 'test')
-rw-r--r--test/runner/main.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/runner/main.go b/test/runner/main.go
index 54e163c48..2b1c96aea 100644
--- a/test/runner/main.go
+++ b/test/runner/main.go
@@ -5,6 +5,7 @@ import (
"log"
"os"
"os/exec"
+ "testing"
"github.com/jesseduffield/lazygit/pkg/integration"
"github.com/stretchr/testify/assert"
@@ -27,18 +28,18 @@ func main() {
err := integration.RunTests(
log.Printf,
runCmdInTerminal,
- func(test *integration.Test, f func() error) {
+ func(test *integration.Test, f func(*testing.T) error) {
if selectedTestName != "" && test.Name != selectedTestName {
return
}
- if err := f(); err != nil {
+ if err := f(nil); err != nil {
log.Print(err.Error())
}
},
updateSnapshots,
record,
speedEnv,
- func(expected string, actual string) {
+ func(_t *testing.T, expected string, actual string) {
assert.Equal(MockTestingT{}, expected, actual, fmt.Sprintf("expected:\n%s\nactual:\n%s\n", expected, actual))
},
)