MCPcopy Create free account
hub / github.com/cli/cli / writeConfigFixture

Function writeConfigFixture

script/ghmock/run_test.go:1216–1224  ·  view source on GitHub ↗
(t *testing.T, directory string, files map[string][]byte)

Source from the content-addressed store, hash-verified

1214}
1215
1216func writeConfigFixture(t *testing.T, directory string, files map[string][]byte) {
1217 t.Helper()
1218 require.NoError(t, os.MkdirAll(directory, 0o700))
1219 for name, data := range files {
1220 path := filepath.Join(directory, filepath.FromSlash(name))
1221 require.NoError(t, os.MkdirAll(filepath.Dir(path), 0o700))
1222 require.NoError(t, os.WriteFile(path, data, 0o600))
1223 }
1224}
1225
1226func TestPrintReport(t *testing.T) {
1227 opts := runOptions{args: []string{"issue", "view", "1"}}

Callers 1

TestRunAllFunction · 0.85

Calls 4

MkdirAllMethod · 0.80
JoinMethod · 0.80
WriteFileMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected