(t *testing.T)
| 380 | } |
| 381 | |
| 382 | func TestConfig_Parse_InvalidYAML(t *testing.T) { |
| 383 | tmpDir := t.TempDir() |
| 384 | confPath := filepath.Join(tmpDir, "commitlint.yaml") |
| 385 | |
| 386 | err := os.WriteFile(confPath, []byte("invalid: yaml: content: ["), 0o644) |
| 387 | if err != nil { |
| 388 | t.Fatalf("failed to write config file: %v", err) |
| 389 | } |
| 390 | |
| 391 | _, err = config.Parse(confPath) |
| 392 | if err == nil { |
| 393 | t.Error("expected error for invalid YAML") |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | func TestConfig_GetEnabledRules(t *testing.T) { |
| 398 | conf := config.NewDefault() |