MCPcopy Index your code
hub / github.com/cli/cli / readTestLockfile

Function readTestLockfile

internal/skills/lockfile/lockfile_test.go:219–226  ·  view source on GitHub ↗

readTestLockfile is a test helper that reads and parses the lockfile from disk.

(t *testing.T, path string)

Source from the content-addressed store, hash-verified

217
218// readTestLockfile is a test helper that reads and parses the lockfile from disk.
219func readTestLockfile(t *testing.T, path string) *file {
220 t.Helper()
221 data, err := os.ReadFile(path)
222 require.NoError(t, err, "lockfile should exist at %s", path)
223 var f file
224 require.NoError(t, json.Unmarshal(data, &f))
225 return &f
226}

Callers 1

TestRecordInstallFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected