Skip to content

Commit c9cf5ae

Browse files
committed
Fix update check handling in tests
1 parent 7920c14 commit c9cf5ae

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.zed/debug.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Project-local debug tasks
2+
//
3+
// For more documentation on how to configure debug tasks,
4+
// see: https://zed.dev/docs/debugger
5+
[
6+
{
7+
"label": "Go (Delve)",
8+
"adapter": "Delve",
9+
"program": "$ZED_FILE",
10+
"request": "launch",
11+
"mode": "debug",
12+
},
13+
{
14+
"label": "Run fmt",
15+
"adapter": "Delve",
16+
"request": "launch",
17+
"mode": "debug",
18+
// For Delve, the program can be a package name
19+
"program": "./cmd/lets",
20+
"args": ["fmt"],
21+
// "buildFlags": [],
22+
},
23+
]

internal/cli/cli_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ func TestAllowsMissingConfig(t *testing.T) {
6060

6161
func TestShouldCheckForUpdate(t *testing.T) {
6262
t.Run("should allow normal interactive commands", func(t *testing.T) {
63+
t.Setenv("CI", "")
64+
t.Setenv("LETS_CHECK_UPDATE", "")
65+
6366
if !shouldCheckForUpdate("lets", true) {
6467
t.Fatal("expected update check to be enabled")
6568
}

0 commit comments

Comments
 (0)