Update cmd/main_test.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
This commit is contained in:
Snider 2025-11-02 00:43:33 +00:00 committed by GitHub
parent 19f6a95964
commit 4fc86ee175
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,12 @@ import (
func TestExecute(t *testing.T) {
// This test simply checks that the Execute function can be called without error.
// It doesn't actually test any of the application's functionality.
rootCmd.SetArgs([]string{})
t.Cleanup(func() {
rootCmd.SetArgs(nil)
})
if err := Execute(); err != nil {
t.Errorf("Execute() failed: %v", err)
}
}
}