diff options
Diffstat (limited to 'pkg/integration/env.go')
-rw-r--r-- | pkg/integration/env.go | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/pkg/integration/env.go b/pkg/integration/env.go index 0c0d0b196..6102923fc 100644 --- a/pkg/integration/env.go +++ b/pkg/integration/env.go @@ -2,9 +2,9 @@ package integration import ( "os" - "strconv" "github.com/jesseduffield/generics/slices" + "github.com/jesseduffield/lazygit/pkg/integration/integration_tests" "github.com/jesseduffield/lazygit/pkg/integration/types" ) @@ -18,35 +18,20 @@ func IntegrationTestName() string { return os.Getenv("LAZYGIT_TEST_NAME") } +func PlayingIntegrationTest() bool { + return IntegrationTestName() != "" +} + func CurrentIntegrationTest() (types.Test, bool) { if !PlayingIntegrationTest() { return nil, false } - return slices.Find(Tests, func(test types.Test) bool { + return slices.Find(integration_tests.Tests, func(test types.Test) bool { return test.Name() == IntegrationTestName() }) } -func PlayingIntegrationTest() bool { - return IntegrationTestName() != "" -} - -// this is the delay in milliseconds between keypresses -// defaults to zero -func KeyPressDelay() int { - delayStr := os.Getenv("KEY_PRESS_DELAY") - if delayStr == "" { - return 0 - } - - delay, err := strconv.Atoi(delayStr) - if err != nil { - panic(err) - } - return delay -} - // OLD integration test format stuff func Replaying() bool { |