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:
@ -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))
|
||||
},
|
||||
)
|
||||
|
Reference in New Issue
Block a user