MCPcopy
hub / github.com/cli/cli / setupTestHome

Function setupTestHome

internal/skills/lockfile/lockfile_test.go:15–21  ·  view source on GitHub ↗

setupTestHome redirects HOME to a temp dir and returns the expected lockfile path.

(t *testing.T)

Source from the content-addressed store, hash-verified

13
14// setupTestHome redirects HOME to a temp dir and returns the expected lockfile path.
15func setupTestHome(t *testing.T) string {
16 t.Helper()
17 home := t.TempDir()
18 t.Setenv("HOME", home)
19 t.Setenv("USERPROFILE", home)
20 return filepath.Join(home, agentsDir, lockFile)
21}
22
23func TestRecordInstall(t *testing.T) {
24 tests := []struct {

Callers 1

TestRecordInstallFunction · 0.85

Calls 2

JoinMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected