(t *testing.T)
| 224 | } |
| 225 | |
| 226 | func 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 | |
| 261 | func TestAssessSetup(t *testing.T) { |
| 262 | t.Run("missing config needs setup", func(t *testing.T) { |
nothing calls this directly
no test coverage detected