1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

ensure we're passing the right testing struct pointer around

This commit is contained in:
Jesse Duffield
2021-04-06 15:20:36 +10:00
parent 0719a3e36e
commit fb9b6314a0
3 changed files with 12 additions and 10 deletions

View File

@ -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))
},
)