MCPcopy Create free account
hub / github.com/coldbrewcloud/coldbrew-cli / TestConfig_ToJSON

Function TestConfig_ToJSON

config/persist_test.go:34–43  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

32}
33
34func TestConfig_ToJSON(t *testing.T) {
35 data, err := refConfig.ToJSON()
36 assert.Nil(t, err)
37 assert.NotNil(t, data)
38
39 testConfig := &Config{}
40 err = testConfig.FromJSON(data)
41 assert.Nil(t, err)
42 assert.Equal(t, refConfig, testConfig)
43}
44
45func TestConfig_ToJSONWithIndent(t *testing.T) {
46 data, err := refConfig.ToJSONWithIndent()

Callers

nothing calls this directly

Calls 2

FromJSONMethod · 0.95
ToJSONMethod · 0.80

Tested by

no test coverage detected