(t *testing.T)
| 105 | } |
| 106 | |
| 107 | func TestEmptyJSON(t *testing.T) { |
| 108 | tmpHome := t.TempDir() |
| 109 | |
| 110 | fn := filepath.Join(tmpHome, ConfigFileName) |
| 111 | err := os.WriteFile(fn, []byte("{}"), 0o600) |
| 112 | assert.NilError(t, err) |
| 113 | |
| 114 | config, err := Load(tmpHome) |
| 115 | assert.NilError(t, err) |
| 116 | |
| 117 | // Now save it and make sure it shows up in new form |
| 118 | saveConfigAndValidateNewFormat(t, config, tmpHome) |
| 119 | } |
| 120 | |
| 121 | func TestMalformedJSON(t *testing.T) { |
| 122 | tmpHome := t.TempDir() |
nothing calls this directly
no test coverage detected
searching dependent graphs…