MCPcopy Create free account
hub / github.com/JordanCoin/codemap / TestProjectConfigStateHelpers

Function TestProjectConfigStateHelpers

config/config_test.go:226–259  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

224}
225
226func TestProjectConfigStateHelpers(t *testing.T) {
227 t.Run("zero config is zero and not boilerplate", func(t *testing.T) {
228 var cfg ProjectConfig
229 if !cfg.IsZero() {
230 t.Fatal("expected zero-value config to be zero")
231 }
232 if cfg.LooksBoilerplate() {
233 t.Fatal("did not expect zero-value config to look boilerplate")
234 }
235 })
236
237 t.Run("extension-only config looks boilerplate", func(t *testing.T) {
238 cfg := ProjectConfig{
239 Only: []string{"go", "ts"},
240 }
241 if cfg.IsZero() {
242 t.Fatal("did not expect extension-only config to be zero")
243 }
244 if !cfg.LooksBoilerplate() {
245 t.Fatal("expected extension-only config to look boilerplate")
246 }
247 })
248
249 t.Run("project-shaped config does not look boilerplate", func(t *testing.T) {
250 cfg := ProjectConfig{
251 Only: []string{"swift"},
252 Exclude: []string{".xcassets", "Snapshots"},
253 Depth: 4,
254 }
255 if cfg.LooksBoilerplate() {
256 t.Fatal("did not expect tuned config to look boilerplate")
257 }
258 })
259}
260
261func TestAssessSetup(t *testing.T) {
262 t.Run("missing config needs setup", func(t *testing.T) {

Callers

nothing calls this directly

Calls 2

IsZeroMethod · 0.95
LooksBoilerplateMethod · 0.95

Tested by

no test coverage detected