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

Function useTestSchemas

script/ghmock/run_test.go:63–73  ·  view source on GitHub ↗

useTestSchemas points ghmock at the small schemas in testdata.

(t *testing.T)

Source from the content-addressed store, hash-verified

61
62// useTestSchemas points ghmock at the small schemas in testdata.
63func useTestSchemas(t *testing.T) {
64 t.Helper()
65 for env, file := range map[string]string{
66 graphQLSource.envVar: "schema.graphql",
67 restSource.envVar: "rest.json",
68 } {
69 p, err := filepath.Abs(filepath.Join("testdata", file))
70 require.NoError(t, err)
71 t.Setenv(env, p)
72 }
73}
74
75// testChecker returns a checker that uses the schemas in testdata.
76func testChecker(t *testing.T) *checker {

Callers 5

TestCmdSetAndResetFunction · 0.85
TestCmdSetFunction · 0.85
TestCmdSchemaFunction · 0.85
TestCmdScaffoldFunction · 0.85
testCheckerFunction · 0.85

Calls 2

JoinMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected